# Wait for a message from your person on a board

> Page: https://docs.plotwork.dev/api/get-v1-boards-board-messages-wait. Index of every page: https://docs.plotwork.dev/llms.txt

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

| Question | Answer |
|---|---|
| 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`](https://docs.plotwork.dev/api/schemas.md#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

| Field | Type | Required | Description |
|---|---|---|---|
| `board` | `string` | yes | The board's id: 22 letters and digits. |

## Query parameters

| Field | Type | Required | Description |
|---|---|---|---|
| `timeoutSeconds` | `integer` | no | At most 25. |
| `keepAlive` | `"true" \| "false"` | no | Listen even when nobody has the board open. Spends the board's daily listening time. |

## Responses

| Status | Meaning | Body |
|---|---|---|
| 200 | The messages that arrived, oldest first, or none. | [`BoardWaitResult`](https://docs.plotwork.dev/api/schemas.md#boardwaitresult) |
| 400 | The query is not valid. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 401 | The API key is missing or not valid. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 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). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 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). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 409 | Nobody has the board open (boards.nobody_here). Stop listening, or pass keepAlive. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 429 | Too many requests, a daily limit is spent, or the board's listening time for the day is (boards.listen_capacity). | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |
| 503 | Live whiteboards are not set up on this server. | [`ErrorResponse`](https://docs.plotwork.dev/api/schemas.md#errorresponse) |

## Response body

A 200 answer has the type [`BoardWaitResult`](https://docs.plotwork.dev/api/schemas.md#boardwaitresult).

| Field | Type | Required | Description |
|---|---|---|---|
| `messages` | `BoardAgentMessage[]` | yes |  |
| `messages[].id` | `string` | yes |  |
| `messages[].at` | `integer` | yes |  |
| `messages[].from` | `string` | yes |  |
| `messages[].text` | `string` | yes |  |
| `messages[].tab` | `string \| null` | yes |  |
| `messages[].tabName` | `string \| null` | yes |  |
| `messages[].revision` | `string \| null` | yes |  |
| `messages[].problems` | `BoardAgentProblem[]` | yes |  |
| `messages[].problems[].code` | `string` | yes | pattern `^[A-Z]\d{3,4}$`. |
| `messages[].problems[].severity` | `"error" \| "warning"` | yes |  |
| `messages[].problems[].line` | `integer` | yes | minimum 1; maximum 1000000. |
| `messages[].problems[].column` | `integer` | yes | minimum 1; maximum 1000000. |
| `messages[].problems[].message` | `string` | yes | at least 1 character; at most 500 characters. |
| `messages[].problems[].hint` | `string \| null` | yes | at least 1 character; at most 500 characters. |
| `listening` | `true` | yes |  |
| `listenSecondsLeft` | `integer \| null` | yes |  |

## See also

| Doc | Why |
|---|---|
| [API reference](https://docs.plotwork.dev/api/reference.md) | Every endpoint, and the error envelope |
| [Schemas](https://docs.plotwork.dev/api/schemas.md) | Every request and response type |
| [Tool reference](https://docs.plotwork.dev/mcp/tools.md) | The operations as callable tools |
