Live spaces API
Live spaces: the shared doc, chat, people, sources and builds.
All paths are relative to the API origin. Send Authorization: Bearer <token> unless a route says otherwise; see the API overview for tokens and errors.
GET /v1/live-spaces
Live spaces you can view; ?workspace=<slug>
Request: listLiveSpacesQuery
Response: listLiveSpacesOutput
POST /v1/live-spaces
Workspace member; plan live space limit (403 past it)
Request: createLiveSpaceInput
Response: liveSpaceSchema
GET /v1/live-spaces/:id
View
Response: liveSpaceSchema
PATCH /v1/live-spaces/:id
Manage
Request: updateLiveSpaceInput
Response: liveSpaceSchema
DELETE /v1/live-spaces/:id
Manage
Response: 204, no body
GET /v1/live-spaces/:id/markdown
View; every page, for agents and export
Response: text/markdown
POST /v1/live-spaces/:id/messages/:messageId/report
View, signed in; keeps a copy of the message; 404 unknown message
Request: reportMessageInput
Response: 204, no body
DELETE /v1/live-spaces/:id/messages/:messageId
The message's author, or manage; sockets get chat.deleted
Response: 204, no body
POST /v1/live-spaces/:id/ticket
View; short-lived signed ticket for the WebSocket
Response: liveSpaceTicketOutput
GET /v1/live-spaces/:id/ws
Yjs doc sync, chat, presence; access re-checked
Request: ?ticket=
Response: WebSocket (LiveSpaceDO)
GET /v1/live-spaces/:id/people
View; pending invites only for manage
Response: liveSpacePeopleOutput
POST /v1/live-spaces/:id/people
Manage; handle adds a member, email makes an invite link
Request: liveSpaceInviteTargetSchema
Response: addLiveSpaceMemberOutput
PATCH /v1/live-spaces/:id/people/:handle
Manage
Request: updateLiveSpaceMemberInput
Response: 204, no body
DELETE /v1/live-spaces/:id/people/:handle
Manage, or yourself (leave)
Response: 204, no body
DELETE /v1/live-spaces/:id/invites/:inviteId
Manage
Response: 204, no body
POST /v1/live-space-invites/accept
Signed in; token stored hashed, single use
Request: acceptLiveSpaceInviteInput
Response: acceptLiveSpaceInviteOutput
GET /v1/live-spaces/:id/sources
View
Response
| Field | Type | Required | Notes |
|---|---|---|---|
sources | object[] | yes |
POST /v1/live-spaces/:id/sources
Comment; MAX_SOURCE_BYTES; bytes in R2, never on the content origin
Request: multipart file
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
name | string | yes | |
contentType | string | yes | |
size | number | yes | |
status | "ready" | "unreadable" | yes | |
summary | string | null | yes | |
extractedChars | number | yes | |
hiddenFromAi | boolean | yes | |
uploadedBy | object | null | yes | |
createdAt | number | yes |
POST /v1/live-spaces/:id/images
Edit; an image for an image block; checked, stored and served like comment images; kept while the space exists
Request: raw image bytes
Response
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | |
url | string | yes | |
contentType | string | yes | |
size | integer | yes |
GET /v1/live-spaces/:id/sources/:sourceId/raw
View
Response: file bytes
DELETE /v1/live-spaces/:id/sources/:sourceId
Edit, or the uploader
Response: 204, no body
POST /v1/live-spaces/:id/build
Edit; new app, or { appId } to rebuild its preview
Request: buildInput
Response: buildOutput