---
title: "Send a follow-up message"
method: POST
path: "/api/public/organizations/{orgId}/chats/{chatId}/messages"
tags: ["Chats"]
---

# Send a follow-up message

`POST /api/public/organizations/{orgId}/chats/{chatId}/messages`

## Request

- Base URL: `https://charts.basedash.com`
- URL: `https://charts.basedash.com/api/public/organizations/{orgId}/chats/{chatId}/messages`
- Auth: HTTP bearer

Sends the next message in an existing chat, continuing the conversation. Works like "Start a chat": use the `wait` parameter to receive the finished response directly, or poll the assistant message (or stream its events) after receiving HTTP 202. Only one response can be generating per chat at a time; sending while the assistant is busy returns HTTP 409.

## Path parameters

- `orgId` string, required: Organization ID
- `chatId` string, required: Chat ID

## Query parameters

- `wait` integer: Maximum number of seconds (1-300) to hold the request open while the assistant responds. If the response finishes in time the completed message is returned; otherwise the request returns HTTP 202 with the in-progress message. Omit to return immediately.

## Headers

- `Idempotency-Key` string: A unique key (up to 255 characters) that makes retries safe: repeating a request with the same key and body within 30 days returns the original result instead of creating a duplicate. Reusing a key with a different body returns HTTP 409; repeating one whose chat was since deleted returns HTTP 404.

## Request body

- SendPublicChatMessageInput
  - `message` string, required: The follow-up message to send to the AI agent. Maximum 10,000 characters.

## Response `200`

The assistant finished responding

- PublicChatTurnResponse
  - `data` PublicChatTurn, required
    - `chat` object, required: The chat this exchange belongs to
      - `id` string, required: Chat ID
      - `organizationId` string, required: Organization ID
      - `name` string, required: Chat name, generated automatically from the first message
      - `status` 'generating' | 'finished', required: `generating` while the assistant is responding, `finished` otherwise
      - `source` 'api', required: Chat creation source
      - `memberId` string, nullable, required: Creating member ID
      - `createdAt` string, date-time, required: Creation timestamp
      - `updatedAt` string, date-time, required: Last update timestamp
    - `userMessage` PublicChatMessage, required: The message you sent
      - `id` string, required: Chat message ID
      - `chatId` string, required: Chat ID
      - `role` 'user' | 'assistant', required: Message author role
      - `status` 'generating' | 'finished' | 'aborted' | 'error' | 'action_required', required: `generating` while the assistant is responding, `finished` when the response is complete, `aborted` if it was canceled, `error` if it failed, and `action_required` if the assistant is waiting on a confirmation it cannot receive over the API
      - `parentId` string, nullable, required: User message ID associated with an assistant response
      - `text` string, required: The message as plain text. For assistant messages this is the final answer, without reasoning or tool activity; see parts for the full structured content.
      - `parts` PublicChatContentPart[], required: Ordered structured message content
        - `id` string, required: Content part ID
        - `type` 'text' | 'reasoning_summary' | 'tool_call' | 'tool_call_result' | 'context' | 'action' | 'image' | 'file', required: Content part type
        - `content` string, required: Text content or a JSON-encoded payload for structured part types
        - `externalId` string, nullable, required: Provider item or tool call ID, when present
        - `name` string, nullable, required: Tool or content part name
        - `phase` 'commentary' | 'final_answer' | 'null', nullable, required: Assistant response phase
        - `createdAt` string, date-time, required: Creation timestamp
        - `updatedAt` string, date-time, required: Last update timestamp
      - `charts` PublicChatChart[], required: Charts referenced by the assistant response
        - `chartId` string, required: Chart ID
        - `chartVersionId` string, required: Chart version ID
        - `title` string, required: Chart title
        - `imageUrl` string, uri, required: URL that renders this chart as a PNG. Request it with the same API key authentication.
        - `mimeType` string, required: Screenshot MIME type
        - `width` integer, required: Screenshot width
        - `height` integer, required: Screenshot height
      - `createdAt` string, date-time, required: Creation timestamp
      - `updatedAt` string, date-time, required: Last update timestamp
    - `assistantMessage` object, required: The assistant's response. Check its status to see whether it has finished responding.
      - `id` string, required: Chat message ID
      - `chatId` string, required: Chat ID
      - `role` 'user' | 'assistant', required: Message author role
      - `status` 'generating' | 'finished' | 'aborted' | 'error' | 'action_required', required: `generating` while the assistant is responding, `finished` when the response is complete, `aborted` if it was canceled, `error` if it failed, and `action_required` if the assistant is waiting on a confirmation it cannot receive over the API
      - `parentId` string, nullable, required: User message ID associated with an assistant response
      - `text` string, required: The message as plain text. For assistant messages this is the final answer, without reasoning or tool activity; see parts for the full structured content.
      - `parts` PublicChatContentPart[], required: Ordered structured message content
        - `id` string, required: Content part ID
        - `type` 'text' | 'reasoning_summary' | 'tool_call' | 'tool_call_result' | 'context' | 'action' | 'image' | 'file', required: Content part type
        - `content` string, required: Text content or a JSON-encoded payload for structured part types
        - `externalId` string, nullable, required: Provider item or tool call ID, when present
        - `name` string, nullable, required: Tool or content part name
        - `phase` 'commentary' | 'final_answer' | 'null', nullable, required: Assistant response phase
        - `createdAt` string, date-time, required: Creation timestamp
        - `updatedAt` string, date-time, required: Last update timestamp
      - `charts` PublicChatChart[], required: Charts referenced by the assistant response
        - `chartId` string, required: Chart ID
        - `chartVersionId` string, required: Chart version ID
        - `title` string, required: Chart title
        - `imageUrl` string, uri, required: URL that renders this chart as a PNG. Request it with the same API key authentication.
        - `mimeType` string, required: Screenshot MIME type
        - `width` integer, required: Screenshot width
        - `height` integer, required: Screenshot height
      - `createdAt` string, date-time, required: Creation timestamp
      - `updatedAt` string, date-time, required: Last update timestamp

## Other responses

- `202`: Message sent; the assistant is still responding
- `400`: Bad request - Invalid JSON body or validation error
- `401`: Unauthorized - Missing or invalid API key
- `403`: Forbidden - Organization trial has expired
- `404`: Not found - Chat not found or no edit access
- `409`: Conflict - The assistant is still responding to an earlier message in this chat (wait for it to finish or cancel it first), or the Idempotency-Key was already used with a different message.
- `429`: Rate limit exceeded - Too many requests
- `500`: Internal server error

---

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