Forums

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

Updating a confluence page via service account api

dillon_cox
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 1, 2026

Hello! I'm trying to update the content of a page via api and am running into trouble. 

As part of the trouble shooting process, I was just trying to get the page itself to verify the service account api key I created works. Here is my curl command I tested, can anyone verify if this is correct? 

curl --request GET \
-H "Authorization: Bearer {api_token}" \
--url "https://api.atlassian.com/ex/confluence/{cloud_id}/wiki/api/v2/pages/{page_id}"

 

The update curl command I was trying was 

curl -X PUT \
"https://api.atlassian.com/ex/confluence/{cloud_id}/wiki/api/v2/pages/{page_id}" \
-H "Authorization: Bearer {service_account_token}" \
-H "Content-Type: application/json" \
-d '{
"id": {page_id},
"status": "current",
"title": {page_title},
"version": {
"number": 2
},
"body": {
"representation": "storage",
"value": "<p>This is a test</p>"
}
}'

0 answers

Suggest an answer

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

Atlassian Community Events