> ## Documentation Index
> Fetch the complete documentation index at: https://docs.knoq.one/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a follow-up message to an existing session

> POST /api/managed-agents/message — sends a follow-up message to an existing session, subject to query quota and rate limits.

After a session is created, use this endpoint to continue the conversation. The message is appended to the session's event log and the background workflow is resumed, picking up where it left off. You should wait until the transcript shows a `status_idle` event before sending the next message — sending a follow-up while the agent is still processing a previous turn will queue immediately after the in-flight turn completes.

This endpoint enforces both per-user burst limits and monthly query quotas. On quota exhaustion the response body includes details about the current spend.

```
POST /api/managed-agents/message
```

## Request

<ParamField body="sessionId" type="string" required>
  The ID of the session to send the message to. Obtain this from the [Create Session](/api-reference/sessions/create) response.
</ParamField>

<ParamField body="text" type="string" required>
  The follow-up message text. Must be non-empty.
</ParamField>

## Response

<ResponseField name="ok" type="boolean">
  Always `true` when the message is accepted. The agent's response will appear in the transcript — poll [Get Transcript](/api-reference/sessions/transcript) to read it.
</ResponseField>

## Example

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://knoq.one/api/managed-agents/message \
    -H "Content-Type: application/json" \
    -H "Origin: https://knoq.one" \
    -H "Cookie: <your-session-cookie>" \
    -d '{
      "sessionId": "a3f2c1d4-e5b6-7890-abcd-ef1234567890",
      "text": "Which of those issues is highest priority?"
    }'
  ```

  ```json Response theme={null}
  {
    "ok": true
  }
  ```
</CodeGroup>

## Errors

| Status | Meaning                                                                                                                                                                                                                                                                                |
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `400`  | `sessionId` or `text` is missing or empty.                                                                                                                                                                                                                                             |
| `401`  | The request is not authenticated. Ensure your session cookie is valid and has not expired.                                                                                                                                                                                             |
| `404`  | No session with the given ID was found for your user and organisation. The session may have been deleted.                                                                                                                                                                              |
| `429`  | Your organisation has exceeded its monthly query quota or per-user burst rate limit (60 messages per minute). The response includes a `Retry-After` header indicating how many seconds to wait, and may include `monthToDateUsd` and `capUsd` fields when a cost cap has been reached. |
