from acontext import AcontextClient
client = AcontextClient(api_key='sk_project_token')
# Create a folder
folder = client.blocks.create(
space_id='space-uuid',
block_type='folder',
title='My Folder'
)
# Create a page under the folder
page = client.blocks.create(
space_id='space-uuid',
parent_id=folder['id'],
block_type='page',
title='My Page',
props={"description": "Page content here"}
){
"code": 123,
"error": "<string>",
"msg": "<string>",
"data": {
"id": "<string>"
}
}Create a new block (supports types: page, folder, sop). For page and folder types, parent_id is optional. For sop type, parent_id is required.
from acontext import AcontextClient
client = AcontextClient(api_key='sk_project_token')
# Create a folder
folder = client.blocks.create(
space_id='space-uuid',
block_type='folder',
title='My Folder'
)
# Create a page under the folder
page = client.blocks.create(
space_id='space-uuid',
parent_id=folder['id'],
block_type='page',
title='My Page',
props={"description": "Page content here"}
){
"code": 123,
"error": "<string>",
"msg": "<string>",
"data": {
"id": "<string>"
}
}Project Bearer token (e.g., "Bearer sk-ac-xxxx")
Space ID
CreateBlock payload