Skip to content

Get Canvas

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

Get or create canvas session for a deal.

Returns unified markdown document with document-level state. Sessions are cached in Redis with 48-hour TTL.

Phase 3: Upgraded to check deal_access table in addition to JWT deal_id. Also seeds the owner grant on first access so sharing can reference it. Phase 4: RequireViewer enforces role-based access.

deal_id
required
Deal Id
string

Successful Response

Media type application/json
CanvasSessionResponse

API response for canvas session — emitted by GET /api/canvas/{deal_id} and POST /api/canvas/{deal_id}/refresh.

Mirrors the CanvasSessionResponse TypedDict in src/canvas/models/canvas_session.py but exposed as a Pydantic model so FastAPI emits a stable schema. extra='allow' covers fields the session_manager.build_response_payload may add over time without breaking the response_model gate.

object
deal_id
required
Deal Id
string
deal_name
Any of:
string
created_at
Any of:
string
document_state
Any of:
string
markdown_content
Any of:
string
version
Any of:
integer
can_export
Any of:
boolean
can_finalize
Any of:
boolean
last_modified_by
Any of:
string
last_modified_at
Any of:
string
initialization_warning
Any of:
string
sections
Any of:
object
key
additional properties
object
key
additional properties
any
is_blank
Any of:
boolean
collab_enabled
Any of:
boolean
user_role
Any of:
string
incomplete_delivery_blocked
Any of:
boolean
key
additional properties
any
Example generated
{
"deal_id": "example",
"deal_name": "example",
"created_at": "example",
"document_state": "example",
"markdown_content": "example",
"version": 1,
"can_export": true,
"can_finalize": true,
"last_modified_by": "example",
"last_modified_at": "example",
"initialization_warning": "example",
"sections": {
"additionalProperty": {}
},
"is_blank": true,
"collab_enabled": true,
"user_role": "example",
"incomplete_delivery_blocked": true
}

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": {}
}
]
}