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

2 answers

1 accepted

1 vote
Answer accepted
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 Champions.
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
0 votes
Pavel Ulan
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!
December 10, 2025

Anwesha Pan, hi. Not the answer, but rather an obvious question:

any idea how to get the current status of the page?

GET /api/content/<page_id>/state request does not work (does not exist), and the
GET /pages/{id} request does not contain this data (there the status shows the State of the page (archive, current))

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 Champions.
December 10, 2025

Hi @Pavel Ulan 

Thanks for your question, did you try the below option?

GET /wiki/rest/api/content/{id}/state (id: The ID of the Confluence page)

Below is a Request example (using CURL)

curl -u YOUR_EMAIL:YOUR_API_TOKEN \ https://YOUR_CONFLUENCE_DOMAIN.atlassian.net/wiki/rest/api/content/YOUR_PAGE_ID/state

  • YOUR_EMAIL:YOUR_API_TOKENReplace with your Atlassian account email and an API token generated from your Confluence profile.
  • YOUR_CONFLUENCE_DOMAINReplace with your Confluence Cloud instance's domain (e.g., example.atlassian.net).
  • YOUR_PAGE_IDReplace with the numerical ID of the Confluence page you want to query.

Thanks,
Anwesha

Like Pavel Ulan likes this
Pavel Ulan
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!
December 11, 2025

Exactly, I didn't even think to look at API v1.
Thank you so much @Anwesha Pan =)

Suggest an answer

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

Atlassian Community Events