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

create page "POST /wiki/rest/api/content/ HTTP/1.1" 415



I am trying to create page using python requests module and getting 415. 

here is my python function : 

def create_page(contenturlheaders):
    create_page = {        "type""page",        "title""test",        "space": {"key": space_key},        "ancestors": [{"id": parent_page_id}],        "status""current",        "body": {            "storage": {"value""This is a new page""representation""storage",}        },    }
    response =, data=create_page, headers=headers)    print(response.status_code)


here are my headers: 

headers = {    "accept": "application/json",    "authorization": "Basic %s" % encoded,}


I do not see authorization is issue here because that i am able to make get content and delete page calls. I have tried adding "X-Atlassian-Token": "no-check" but still gets 415. My user also has full access to write and read.


any  help appreciated. 





1 comment

There was an issue with body. It got resolved after providing body in html format. 


 "body": {            "storage": {"value""This is a new page""representation""storage",}        },    }




"body": {            "storage": {"value": "<p>This is a new page</p>", "representation": "storage",}        },    }

Like Zak Laughton likes this


Log in or Sign up to comment
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 ...

40,573 views 28 130
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