| name | notion-api-4-page-operations |
| description | Sub-skill of notion-api: 4. Page Operations. |
| version | 1.0.0 |
| category | business |
| type | reference |
| scripts_exempt | true |
4. Page Operations
4. Page Operations
Create Pages:
curl -s -X POST "https://api.notion.com/v1/pages" \
-H "Authorization: Bearer $NOTION_API_KEY" \
-H "Notion-Version: 2022-06-28" \
-H "Content-Type: application/json" \
-d '{
"parent": {"database_id": "DATABASE_ID"},
"properties": {
"Name": {
"title": [{"text": {"content": "New Task"}}]
},
"Status": {
"select": {"name": "To Do"}
},
"Priority": {
"select": {"name": "High"}
},
"Due Date": {
"date": {"start": "2025-01-20"}
}
}
}' | jq
Python - Page Operations:
new_page = notion.pages.create(
parent={"database_id": "your-database-id"},
properties={
"Name": {
"title": [{"text": {"content": "New Task"}}]
},
"Status": {
"select": {"name": "To Do"}
},
"Priority": {
"select": {"name": "High"}
},
"Due Date": {
"date": {"start": "2025-01-20", "end": "2025-01-25"}
},
"Tags": {
"multi_select": [
{"name": "development"},
{"name": "urgent"}
]
},
"Assignee": {
"people": [{"id": "user-id"}]
},
"Notes": {
"rich_text": [{"text": {"content": "Task description here"}}]
},
"Completed": {
"checkbox": False
},
"Amount": {
"number": 100
},
"URL": {
"url": "https://example.com"
},
"Email": {
:
}
}
)
()
new_page = notion.pages.create(
parent={: },
properties={
: {: [{: {: }}]}
},
children=[
{
: ,
: ,
: {
: [{: , : {: }}]
}
},
{
: ,
: ,
: {
: [{: , : {: }}]
}
},
{
: ,
: ,
: {
: [{: , : {: }}],
:
}
}
]
)
page = notion.pages.retrieve(page_id=)
()
notion.pages.update(
page_id=,
properties={
: {: {: }},
: {: }
}
)
notion.pages.update(
page_id=,
archived=
)
notion.pages.update(
page_id=,
archived=
)