JIRA on creation of new issue

Hey mates,

today i was trying to create a new issue using REST API from JIRA and I always get the error:

HTTP/1.1 405 Method Not Allowed 

I am using OAuth authentication to create and edit issues. I already edit a few fields on issues that are already created, but now I am trying to create new issue.




JSON code

"fields": {
"project": {
"key": "ProjectKey"
"component": "CAIX - TEST 1",
"summary": "TESTE REQ. NAME",
"issuetype": {
"name": "Issue"
"labels": ["CASE-TEST", "REQUIREMENT", "Tests"]

 Note: i change the project key and page of JIRA for this example.

My url: 

My JIRA version is V7.1.9.

I already search and find that is another way to create issues using rest/api/2/issue/createmeta, but i dont want to use that.


Do you have any ideia of whats is wrong ? If necessary i can put put a example of the code.

1 answer

0 votes


REST API can send GET, POST, PUT, DELETE requests. Method Not Allowed usually means that you send a wrong request type. If you want to create an issue, it is a POST request. Make sure you make a POST request.

If the problem is not fixed kindly provide your code for making the request.

I already try the json example from JIRA API but the error still appears. See the code i am using

    "fields": {
          "key": "TEST"
       "summary": "REST ye merry gentlemen.",
       "description": "Creating of an issue using project keys and issue type names using the REST API",
       "issuetype": {
          "name": "Bug"


I Post via this code:

uri is the page: https://xpto.jira.com/rest/api/2/issue/

json2 is the example


HttpPut put = new HttpPut(uri);
HttpResponse response = null;
put.setHeader("Content-Type", "application/json");
put.setHeader("Authorization", "Basic " + args.getJiraAuthToken());
try {
HttpEntity entity = new ByteArrayEntity(json2.getBytes("UTF-8"));
response = httpClient.execute(put);

}catch (Exception e){
}finally {
return response;




Replace new HttpPut(uri) with new HttpPost(uri)

Martin Varga Atlassian Team Oct 31, 2017

What @Alexej said. Also:


is not used to create issues. This is the meta data documentation for the fields you are sending to the create endpoint. 

I already find the problem :)

Needed to change to HttpPost and need to change the IssueType.


@Martin Varga AND @Alexey Matveev [cPrime] Thanks for your help guys! If u need something from me, contact me :)


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,076 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you