Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

No valid project id or key using REST API with Java

Schmidt_ Paul
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 24, 2026

Hi community,

I try to create an Jira issue via

"/rest/api/3/issue"

with payload:
{
"fields" : {
"project" : {
"key" : "ABCD",
"id" : 10463
},
"issuetype" : {
"id" : "10037"
},
"summary" : "Connector generierte UserStory"
}
}

 

Unfortunately I always get "Geben Sie eine gültige Projekt-ID oder einen gültigen Schlüssel an"

When I try the same payload in RESTman with the same auth token the issue is successfully created.

The project id matches the project key. I checked it via the /project/search REST endpoint.

In RESTman I used the same auth token like in my Java application. Reading issues and projects works. Only creating issues doesn't.

I also tried to proivide only project id or key. Same result.

Any hints?

3 answers

1 accepted

1 vote
Answer accepted
Schmidt_ Paul
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 24, 2026

Found the answer in this post: https://community.developer.atlassian.com/t/java-unirest-client-jira-cloud-api/49877/6

 

The API documentation is wrong!

HttpResponse<JsonNode> response = Unirest.post("https://your-domain.atlassian.net/rest/api/3/issue") 
.basicAuth("email@example.com", "<api_token>")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body(payload)
.asJson();

It needs to be:

HttpResponse<JsonNode> response = Unirest.post("https://your-domain.atlassian.net/rest/api/3/issue") 
.basicAuth("email@example.com", "<api_token>")
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.body(payload.toString())
.asJson();
0 votes
Anastasiia Dimnych
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 3, 2026

Hi @Schmidt_ Paul

Thanks for reporting this inconsistency! I am passing over your feedback and request to update the documentation. Appropriate team will work on it according to their workflows and prioritization. 

Best,

Anastasiia 

0 votes
Arkadiusz Wroblewski
Community Champion
June 24, 2026

Hello @Schmidt_ Paul 

I flagged this post for Atlassian, so someone can forward it to the respective team for documentation review.

Glad you can solve it :)

Best,

Arkadiusz🤠

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events