Skip to main content
POST
/
space
Python
from acontext import AcontextClient

client = AcontextClient(api_key='sk_project_token')

# Create a space
space = client.spaces.create(configs={"name": "My Space"})
print(f"Created space: {space.id}")
{
  "code": 123,
  "error": "<string>",
  "msg": "<string>",
  "data": {
    "configs": {},
    "created_at": "<string>",
    "id": "<string>",
    "project_id": "<string>",
    "updated_at": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Project Bearer token (e.g., "Bearer sk-ac-xxxx")

Body

application/json

CreateSpace payload

configs
object

Response

201 - application/json

Created

code
integer
error
string
msg
string
data
object