---
title: "Send a message to an agent run"
method: POST
path: "/api/agents/{agentId}/run-async/{runId}/messages"
tags: ["Agents"]
---

# Send a message to an agent run

`POST /api/agents/{agentId}/run-async/{runId}/messages`

## Request

- Base URL: `https://app.cotool.ai`
- URL: `https://app.cotool.ai/api/agents/{agentId}/run-async/{runId}/messages`
- Auth: HTTP bearer

Continue an existing agent run with a follow-up message, as if it were typed in the run's chat. The agent keeps the run's full context. A run that is busy answers once its current turn ends. Poll `/api/agents/:agentId/run-async/:runId/status` until `done`, then read the reply from `/api/agents/:agentId/run-async/:runId/result`.

## Path parameters

- `agentId` string, uuid, required: Unique identifier of the agent
- `runId` string, uuid, required: Unique identifier of the asynchronous run to check status for

## Request body

- object: A follow-up message for an existing agent run
  - `message` string, required: Markdown message for the agent
  - `clientMessageId` string, uuid: Your id for this message; a retried request with the same id is not sent twice

## Response `200`

Successful response

- object: The message is queued; the run answers it once any running turn ends
  - `runId` string, uuid, required
  - `messageId` string, uuid, required: The clientMessageId the message was queued under
  - `status` 'queued', required

## Other responses

- `400`: Bad request — input validation failed or the request was malformed
- `401`: Unauthorized — missing or invalid API key / session
- `403`: Forbidden — the authenticated user lacks the required permissions
- `500`: Internal server error

---

[API](https://skmtc.dev/cotool/apis/cotool-api.md) - [All operations](https://skmtc.dev/cotool/apis/cotool-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cotool/apis/cotool-api/revisions/f5abe0add203?raw)
