Skip to content
Connect an agent

Organisations

Open a push stream of your person's messages on a board

A ticket for a WebSocket that is sent this agent connection's messages on the board the moment its person writes them, so nothing polls.

POST/v1/boards/{board}/listeners

TL;DR

QuestionAnswer
What does it do?Open a push stream of your person's messages on a board.
What does it take?board in the path.
What does it return?Status 200 with a body of type BoardListenTicket.
What can go wrong?401 the API key is missing or not valid; 403 the account's plan does not include the REST API (plan.rest_not_included), the key is a person's own (boards.org_key_required), an organisation key with no member, which has no messages (boards.connection_required), a trusted publisher (boards.publisher_not_allowed), or boards are not on for the organisation (boards.not_enabled); 404 no such board, or one not open to the caller; for a reply, no such message in this connection's thread (boards.message_not_found); 413 the body is larger than the API takes; 429 too many requests, or a daily limit is spent; 503 live whiteboards are not set up on this server. Every failure uses the one error envelope.

What it does

A ticket for a WebSocket that is sent this agent connection's messages on the board the moment its person writes them, so nothing polls. Open streamUrl with the subprotocols [protocol, ticket]. The ticket reads only this connection's thread on this board, never edits, and ends after 12 hours; a new one revokes the one before. Answer each message with the replies route. The REST twin of open_board_listener.

Path parameters

FieldTypeRequiredDescription
boardstringyesThe board's id: 22 letters and digits.

Responses

StatusMeaningBody
200Where to connect, the ticket and when it ends.BoardListenTicket
401The API key is missing or not valid.ErrorResponse
403The account's plan does not include the REST API (plan.rest_not_included), the key is a person's own (boards.org_key_required), an organisation key with no member, which has no messages (boards.connection_required), a trusted publisher (boards.publisher_not_allowed), or boards are not on for the organisation (boards.not_enabled).ErrorResponse
404No such board, or one not open to the caller; for a reply, no such message in this connection's thread (boards.message_not_found).ErrorResponse
413The body is larger than the API takes.ErrorResponse
429Too many requests, or a daily limit is spent.ErrorResponse
503Live whiteboards are not set up on this server.ErrorResponse

Response body

A 200 answer has the type BoardListenTicket.

FieldTypeRequiredDescription
streamUrlstringyesThe WebSocket address of the push stream for this board.
ticketstringyesSent as the second WebSocket subprotocol, after protocol. Reads only this connection's thread on this board. Keep it out of logs and files.
protocolstringyesThe first WebSocket subprotocol to ask for; the stream answers with it.
expiresAtintegeryesWhen the ticket ends, in milliseconds since the epoch; the stream closes then.

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools