Forums

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

Is there a confluence REST API I can use to set a page status?

Alin Oana
Banned
August 4, 2025

Hi,

In my space, I have defined 3 statuses. Is there an REST API I can use to set any of these 3 statuses to a specified page? 

The create and update page APIs only allows current or draft statuses to be passed.

Thanks 

 

statuses.png

1 answer

1 vote
Anwesha Pan _TCS_
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.
August 4, 2025

Hi @Alin Oana 

I was able to find the below information

To set a Confluence page's "content state" (which is what Confluence refers to as "page status" in the UI) using the REST API, you can utilize the PUT method on the /rest/api/content/{id}/state endpoint.

Code

PUT /wiki/rest/api/content/{id}/state
  • {id}The ID of the Confluence page you want to update.
Request Body (JSON):
The request body should contain the desired contentState object. This object includes properties like name (the status name, e.g., "Draft", "Archived"), color, and isSpaceState.

 Example (using Curl)

curl -u <username>:<password_or_api_token> -X PUT \
-H "Content-Type: application/json" \
-d '{
"name": "Archived",
"color": "green",
"isSpaceState": false
}' \
<your_confluence_base_url>/wiki/rest/api/content/<page_id>/state
  • -u <username>:<password_or_api_token>Authenticates your request. For Confluence Cloud, an API token is recommended.
  • -X PUTSpecifies the HTTP method.
  • -H "Content-Type: application/json"Indicates that the request body is in JSON format.
  • -d '{...}'Contains the JSON payload defining the new content state.
    • "name": The desired status name (e.g., "Current", "Deleted", "Historical", "Draft", "Archived").
    • "color": (Optional) The color associated with the status.
    • "isSpaceState": (Optional) A boolean indicating if this is a space-level state.
  • <your_confluence_base_url>/wiki/rest/api/content/<page_id>/stateThe full URL to the content state endpoint for the specific page. Replace <your_confluence_base_url> and <page_id> with your actual values.

 

I hope this helps!

Thanks,
Anwesha
 

Alin Oana
Banned
August 4, 2025

@Anwesha Pan _TCS_ Thank you! It worked.

Like Anwesha Pan _TCS_ likes this

Suggest an answer

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

Atlassian Community Events