How can I add options to a Select List custom field via Rest Api?

@DamlaNazYilmaz welcome to the Atlassian developer community.

The custom field types are tricky. There’s a great reference on our support site about Advanced field editing with detailed examples for pretty much anything you need to set. For the case of single-select list:

"customfield_11449" : { "value": "option3" }

or

"customfield_11449" : { "id": 10112 }

And just for the sake of having a complete JSON request body, here’s an example that works on my site:

{
    "fields": {
        "project": { "key": "TIS" },
        "issuetype": { "id": "10000" },
        "customfield_10432" : { "value": "Positive" },
        "summary": "Main order flow broken",
        "description": {
            "type": "doc",
            "version": 1,
            "content": [
                {
                    "type": "paragraph",
                    "content": [
                        {
                            "type": "inlineCard",
                            "attrs": {
                                "url": "https://devpartisan.atlassian.net/browse/NGEW-1"
                            }
                        }
                    ]
                }
            ]
        }
    }
}

Pay particular attention to the id example where there are no quotes. There are some fields that require quotes for id. Also, some fields require the use of operations inside the payload, like update and add.

3 Likes