Skip to main content

Confluence REST add Page

How to add a Confluence Page as a child of an existing page via the REST API

Then Confluence API examples are good, but they don't mention how to specify a parent page, under which I want the newly created page must be.


curl -u mihamina:my_password -X POST -H 'Content-Type: application/json' 
     -d '{ "type":"page",
           "title":"Andrana", 
           "ancestors":[{"id":"61145092"}],
           "space":{"key":"MVT"},
           "body":{"storage":{"value":"This is a new page",
                              "representation":"storage"}}}' \
     https://confluence.rktmb.org/rest/api/content/ | python -mjson.tool