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