Forums

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

Issue type in the post /issue api

Mansi Gusain
Contributor
March 19, 2025

Hi, I wanted to create an issue using postman using this api - 

 

https://name.atlassian.net/rest/api/3/issue

 

so as per the documentation lot of fields are there- 

 

The Jira Cloud platform REST API

But the issue type is confusing me . How to add the issue type?

 

 

 

{
  "fields": {
    "assignee": {
      "id": "712020:6d4ed947-e444-4b19-a16d-caee6b51d4c8"
    },
    "parent": {
      "key": "MANSI"
    },
  "project": {
      "id": "10001"
    },
"summary": "Main order flow broken",
 "issuetype": {
      "id": "10000"  ------->this how to define this failing for all values
    }
}}
I used the /createMeta also to get the issue type but it does not fix the issue 

3 answers

1 accepted

5 votes
Answer accepted
Mahesh Shinde
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2025

Hi @Mansi Gusain ,

 

The error is related to parent field in REST API, have you used that one in your request?

For more details, you can refer this article: https://www.atlassian.com/blog/developer/creating-a-jira-cloud-issue-in-a-single-rest-call

 

Let me know if you still  having issues.

Regards,

Mahesh Shinde

Mansi Gusain
Contributor
March 19, 2025

Hi thanks for this article I was able to use the following body - 

 

{"fields": {
        "summary": "Summit 2019 is awesome!",
        "issuetype": {
            "name": "Task"
        },
        "project": {
            "key": "MANSI"
        },
        "description": {
            "type": "doc",
            "version": 1,
            "content": [
                {
                "type": "paragraph",
                "content": [
                    {
                    "text": "This is the description.",
                    "type": "text"
                    }
                ]
                }
            ]
        }
    }
}
Mansi Gusain
Contributor
March 19, 2025

Hi what are the names I can give to the api -

 

1. Task works 

but not the bug or story...

0 votes
Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2025

@Mansi Gusain 

Your parent key should be like MANSI-123 etc

  "parent": {
      "key": "MANSI"
    },
Can you check this?
Mansi Gusain
Contributor
March 19, 2025

Hi, the parent key is MANSI only, I checked it. image.png

Vishal Biyani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2025

As you are creating Story or Task, parent key needs to be Epic. 

It is not possible that Epic will have key = MANSI.

Mansi Gusain
Contributor
March 19, 2025

okay Vishal please correct me if I am wrong, I can create tasks directly in the project but to create a bug, story I need epic?

 

See this is the operation - image.pngimage.png

 

So I am able to create the task 

Mansi Gusain
Contributor
March 19, 2025

Okay I got the answer, on the main UI of the project I have the feature to create the issue types- image.png

So now can use the api to create different types of issues for me. 

Thankyou both for your help and prompt replies. Kudos to the support team. Thanks!!!

0 votes
Mahesh Shinde
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2025

Hi @Mansi Gusain

Welcome to Atlassian community!

As per the REST API call for create issue,

You have to use the field like as below:

"issuetype": { "id": "<number>" }

You can get the issuetype ID details from admin section of Jira.

Please, let me know if you have any questions.

Regards,

Mahesh Shinde

Mansi Gusain
Contributor
March 19, 2025

Hi thankyou for replying, the so I went to the admin section there the id was 10004 

 

image.png

 

Now from here I add it to the id in the body for issue- image.png

Mansi Gusain
Contributor
March 19, 2025

image.png

Mahesh Shinde
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 19, 2025

Hi @Mansi Gusain

Parent field is required if you are creating subtask issue for parent issue, you can remove it.

Regards,

Mahesh Shinde

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events