Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Cannot make a page in a Confluence Space using REST API.

I am trying to do a post request on my companies confluence to make a page using the REST API.

When I attempt to do it, I get a JSON response saying that it is forbidden.
I am able to make a page from the GUI, but not with the REST Api.
I have done Basic Authentication for the query.
Below is a picture of the request and the response.

My Question : how can I make the page on the confluence space with the rest Api?
I have tried: making a personal access token. And then using it with my request, but that didnt work either. 


1 answer

1 accepted

1 vote
Answer accepted
Pramodh M Community Leader Jan 05, 2022

Hi @Sufficient Monk 

Can you try below API and let me know the result

curl -u username:password -X POST -H 'Content-Type: application/json' \
-d '{"type":"page","title":"new page", "ancestors":[{"id":1638403}], "space":{"key":"SPACE_KEY"},"body":{"storage":{"value": "<p>This is a new page</p>","representation":"storage"}}}' \


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence Cloud

🏠 Say hello to the new Confluence Home!

Hi Atlassian Community, My name is DJ Chung, and I’m a Product Manager on the Confluence Cloud team. Today, I’m excited to share a new and improved version of Home. The new Home helps you ...

35,194 views 26 121
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you