Forums

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

Insert status label macro over rest api in jira cloud

Janco Hoekstra
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!
July 3, 2025

Hi community,

I'm trying to insert a status label macro into a multi line textfield (rich text enabled) over rest api using the following payload:


{
    "type": "status",
    "attrs": {
        "colour": "Green",
        "title": "On track",
        "subtle": "true"
    }
}

using https://support.atlassian.com/confluence-cloud/docs/insert-the-status-macro/
document as reference for the type and parameters.

This however does not work...

Does anyone know the right format of the json payload to make this happen? 

P.S. I managed to insert other macro's in quiet the same way, so I suspect that the type or the format of the parameters is not right...

1 answer

1 accepted

1 vote
Answer accepted
Janco Hoekstra
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!
July 7, 2025

I've found the answer in the following document:  https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/status/.   along with the formats for all other elements.

The correct format for the status label is:

{
  "type": "status",
  "attrs": {
      "localId": "abcdef12-abcd-abcd-abcd-abcdef123456",
      "text": "In Progress",
      "color": "yellow"
    }
}

(the localid has to be a unique value within the issue)

Tomislav Tobijas
Community Champion
July 7, 2025

Nice one @Janco Hoekstra !

I was testing this myself, but didn't have that much time to find the answer. 

Cheers for sharing!

Suggest an answer

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

Atlassian Community Events