Skip to content

Get Deal Presence

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

Return the current presence snapshot for all active viewers of a deal.

Each entry in viewers contains:

  • user_id — authenticated user identifier
  • user_name — display name (if known)
  • deal_role — owner | editor | commenter | viewer
  • editing_sections — list of section keys the user currently holds edit-locks on (empty if just viewing)
  • connected_since — ISO-8601 UTC timestamp of first connection

Multiple tabs from the same user are merged into a single entry with their editing_sections sets unioned.

In multi-worker mode, viewers from other workers are merged via the WebSocketManager’s get_deal_presence() method, which queries the Redis pub/sub bridge’s presence sorted sets internally.

Requires: Viewer or higher role on the deal.

deal_id
required
Deal Id
string

Successful Response

Media type application/json
Example generated
example

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