Skip to content
Connect an agent

Organisations

Wait for a message from your person on a board

A long poll for an agent a member connected: answers as soon as that member sends it a message on the board, or after timeoutSeconds (at most 25) with messages empty; call it again to keep listening.

GET/v1/boards/{board}/messages/wait

TL;DR

QuestionAnswer
What does it do?Wait for a message from your person on a board.
What does it take?board in the path, and timeoutSeconds, keepAlive in the query string.
What does it return?Status 200 with a body of type BoardWaitResult.
What can go wrong?400 the query is not valid; 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); 409 nobody has the board open (boards.nobody_here). Stop listening, or pass keepAlive; 429 too many requests, a daily limit is spent, or the board's listening time for the day is (boards.listen_capacity); 503 live whiteboards are not set up on this server. Every failure uses the one error envelope.

What it does

A long poll for an agent a member connected: answers as soon as that member sends it a message on the board, or after timeoutSeconds (at most 25) with messages empty; call it again to keep listening. While it waits, the board shows the agent listening. Refused with 409 boards.nobody_here when nobody has the board open (unless keepAlive), and 429 boards.listen_capacity once the board's listening time for the day is spent. The REST twin of wait_for_board_messages.

Path parameters

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

Query parameters

FieldTypeRequiredDescription
timeoutSecondsintegernoAt most 25.
keepAlive"true" | "false"noListen even when nobody has the board open. Spends the board's daily listening time.

Responses

StatusMeaningBody
200The messages that arrived, oldest first, or none.BoardWaitResult
400The query is not valid.ErrorResponse
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
409Nobody has the board open (boards.nobody_here). Stop listening, or pass keepAlive.ErrorResponse
429Too many requests, a daily limit is spent, or the board's listening time for the day is (boards.listen_capacity).ErrorResponse
503Live whiteboards are not set up on this server.ErrorResponse

Response body

A 200 answer has the type BoardWaitResult.

FieldTypeRequiredDescription
messagesBoardAgentMessage[]yes
messages[].idstringyes
messages[].atintegeryes
messages[].fromstringyes
messages[].textstringyes
messages[].tabstring | nullyes
messages[].tabNamestring | nullyes
messages[].revisionstring | nullyes
messages[].problemsBoardAgentProblem[]yes
messages[].problems[].codestringyespattern ^[A-Z]\d{3,4}$.
messages[].problems[].severity"error" | "warning"yes
messages[].problems[].lineintegeryesminimum 1; maximum 1000000.
messages[].problems[].columnintegeryesminimum 1; maximum 1000000.
messages[].problems[].messagestringyesat least 1 character; at most 500 characters.
messages[].problems[].hintstring | nullyesat least 1 character; at most 500 characters.
listeningtrueyes
listenSecondsLeftinteger | nullyes

See also

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