Creating Issue returns "No Issue Create payload supplied"

I am trying to create an issue using API v3.
I successfully got that API token using oauth with next permissions:
offline_access write:jira-work read:jira-work

With this API token I can successfully get the issue by id, but I can’t create an issue. I am getting response with status 400:

{
    "errorMessages": [ "No Issue Create payload supplied"],
    "errors": {}
}

And here is a body I am passing:

{
    "fields": {
        "project": {
            "id": "10009"
        },
        "issuetype": {
            "id": "10054"
        },
        "summary": "test",
        "assignee": null,
        "priority": {
            "id": "3",
            "name": "Medium",
            "iconUrl": "https://some-org.atlassian.net/images/icons/priorities/medium.svg"
        },
        "labels": [],
        "customfield_10003": [],
        "customfield_10002": [],
        "customfield_10092": [],
        "reporter": null
    },
    "update": {},
    "watchers": [
        "60e6a285131bf80069c310b0"
    ],
}

I used almost the same body as I create the issue using UI, except externalToken key in body.

Please help to solve this issue

Hello @PavelPetryk

You haven’t provided any information as to how you’re sending the request and using what.

Are you using a particular programming language with a particular library or function or a particular method? Which specific v3 REST API endpoint are you using, what is the method (PUT or POST), what is the full URL / path of the request and what other parameters are you passing with the request?

Next, have you tested the same request using a test tool like Postman to see if it’s just a coding mistake?

And finally, I can see that your request body contains numerous mistakes:

  1. You can’t set reporter as null; every issue must have a reporter. If you don’t set a reporter for the issue, it will automatically be set as the user who created the issue.
  2. You can’t set the values for a priority’s name or iconUrl, only it’s id
  3. You can’t set watchers without declaring each value in the array as being an accountId
  4. It serves no purpose to:
  • Set empty arrays of values for labels and customfields, they are empty by default.
  • Set assignee to null, it’s null by default
  • Have an empty update{} if there is nothing to update
1 Like

Thats very strange, but today it started to work without any changes from my side