Get Canvas
const url = 'https://example.com/api/canvas/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Responses
Section titled “ Responses ”Successful Response
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
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
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}