---
title: "Send a message"
method: POST
path: "/api/v2/projects/{slug}/chats/"
tags: ["Chat"]
---

# Send a message

`POST /api/v2/projects/{slug}/chats/`

## Request

- Base URL: `https://app.biel.ai`
- URL: `https://app.biel.ai/api/v2/projects/{slug}/chats/`
- Auth: one of:
  - API key in header `Authorization`
  - none

Send a message and get an AI response. Returns 201 for new chats, 200 for existing ones.
To append to the latest output-capped assistant response, omit message and send chat_uuid and continue_message_id.
Continuation returns the same user_message_id and assistant messageId with the combined text.
Existing conversations require X-Chat-Restore-Token in addition to project access.

Chat and answer continuations consume interactions from your team's allowance.
With extra usage enabled, interactions beyond that allowance cost **$0.05** each. See
[extra usage](/administration/subscription#extra-usage).

**Required permission:** `chats_create`

## Path parameters

- `slug` string, required

## Headers

- `X-Chat-Restore-Token` string

## Request body

- union: Body for [`POST /api/v2/projects/{slug}/chats/`](/api/send-message).
  - object
    - `message` string, required: The message to send to the AI. Omit when continuing an existing assistant response.
    - `continue_message_id` string, uuid: UUID of the latest incomplete assistant response. Appends to the same message without a new user turn. Requires chat_uuid and X-Chat-Restore-Token.
    - `chat_uuid` string, uuid: UUID of an existing chat to continue. Creates a new chat if omitted.
    - `url` string: URL where the chat is initiated from.
    - `email` string: Email or ID for conversation tracking in analytics.
    - `think_mode` boolean: Enable reasoning mode for deeper analysis. Requires reasoning mode to be enabled for the project.
    - `metadata` string: Tag to identify the conversation source (e.g., `mcp`, `slack`, `web`).
  - object
    - `message` string: The message to send to the AI. Omit when continuing an existing assistant response.
    - `continue_message_id` string, uuid, required: UUID of the latest incomplete assistant response. Appends to the same message without a new user turn. Requires chat_uuid and X-Chat-Restore-Token.
    - `chat_uuid` string, uuid, required: UUID of an existing chat to continue. Creates a new chat if omitted.
    - `url` string: URL where the chat is initiated from.
    - `email` string: Email or ID for conversation tracking in analytics.
    - `think_mode` boolean: Enable reasoning mode for deeper analysis. Requires reasoning mode to be enabled for the project.
    - `metadata` string: Tag to identify the conversation source (e.g., `mcp`, `slack`, `web`).

## Response `200`

Message sent successfully

- SendMessageResponse: AI response to a sent message.
  - `user_message_id` string
  - `ai_message` object
    - `from` string
    - `message` string
    - `messageId` string
    - `isPartial` boolean
    - `incomplete` boolean: True when the answer could not be completed.
    - `generation_metadata` GenerationMetadata
      - `incomplete` boolean
      - `stop_reason` string, nullable
      - `continuation_count` integer: Additional generation calls used for continuation.
      - `interrupted` boolean
      - `continuation_available` boolean: Whether the latest output-capped response has a retained continuation request.
    - `timestamp` string
    - `sources` object[]
    - `actions` object[]: List of the project's actions. Render each as a button labeled `button_text` that links to `url`.
      - `name` string
      - `button_text` string
      - `url` string
  - `chat_uuid` string
  - `restore_token` string: Opaque capability for this conversation. Keep it with chat_uuid and send it only in X-Chat-Restore-Token, never in URLs.

## Other responses

- `201`: New chat created successfully
- `400`: Bad request. Invalid or missing data.
- `403`: Forbidden. Missing permissions.
- `404`: Resource not found.
- `409`: This conversation already has a generation in progress. Wait before retrying.

---

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