Skip to content

Get Collab State

GET
/api/canvas/{deal_id}/collab-state
curl --request GET \
--url https://example.com/api/canvas/example/collab-state \
--header 'Authorization: Bearer <token>'

Get the current collab state for a document.

Returns collab_enabled status, and if enabled, the current OT version and PM document JSON needed to initialize prosemirror-collab on the client.

Phase C2: RequireViewer — any collaborator can read collab state.

deal_id
required
Deal Id
string

Successful Response

Media type application/json
CollabStateResponse

Response for GET /api/canvas/{deal_id}/collab-state.

object
collab_enabled
required
Collab Enabled
boolean
version
Any of:
integer
doc
Any of:
object
key
additional properties
any
Example generated
{
"collab_enabled": true,
"version": 1,
"doc": {}
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}