# Confluence: Create subpage via python api

**URL:** <https://community.developer.atlassian.com/t/confluence-create-subpage-via-python-api/39463>\
**Category:** Confluence Development\
**Tags:** confluence-server\
**Created:** [June 28, 2020, 3:54pm UTC](https://community.developer.atlassian.com/t/confluence-create-subpage-via-python-api/39463 "2020-06-28T15:54:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BenjaminSeeger](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@BenjaminSeeger](https://community.developer.atlassian.com/u/BenjaminSeeger)\
**Post date:** [June 28, 2020, 3:54pm UTC](https://community.developer.atlassian.com/t/confluence-create-subpage-via-python-api/39463/1 "2020-06-28T15:54:33Z")

</div>

I’m trying to develop an app were I can create a main page and subpages benieve the main page. I am using the atlassian python api were all the commands can be found here: [Confluence module — Atlassian Python API 3.32.2 documentation](https://atlassian-python-api.readthedocs.io/confluence.html) .

The link descrips how to create a main page but not how a subpage can be created. Therefore I wanted to know how can I create a subpage under the main page.

---

<div class="post-metadata">

**Author:** ![amoerchen](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/amoerchen/32/36650_2.png) [@amoerchen](https://community.developer.atlassian.com/u/amoerchen)\
**Post date:** [June 29, 2020, 5:15pm UTC](https://community.developer.atlassian.com/t/confluence-create-subpage-via-python-api/39463/2 "2020-06-29T17:15:09Z")

</div>

You should ask this at the Github project: [Issues · atlassian-api/atlassian-python-api · GitHub](https://github.com/atlassian-api/atlassian-python-api/issues)

---

<div class="post-metadata">

**Author:** ![rwhitbeck](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/rwhitbeck/32/35781_2.png) [@rwhitbeck](https://community.developer.atlassian.com/u/rwhitbeck)\
**Post date:** [June 29, 2020, 8:16pm UTC](https://community.developer.atlassian.com/t/confluence-create-subpage-via-python-api/39463/3 "2020-06-29T20:16:54Z")

</div>

> # Create page from scratch
> 
> `confluence.create_page(space, title, body, parent_id=None, type='page', representation='storage')`

Just specify the id of the parent page you want to create page under. Here it says parent\_id=None but if you want to create a subpage you specify the id of the page you want to put it under.

That’s how the API works I would assume they followed the same approach in their method.
