---
title: "Send Chat Message"
method: POST
path: "/v1/chat/{chat_id}/messages"
tags: ["chat"]
---

# Send Chat Message

`POST /v1/chat/{chat_id}/messages`

## Request

- Base URL: `https://api.happenstance.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.happenstance.ai/v1/chat/{chat_id}/messages`
- Auth: HTTP bearer

Send a message to a chat started through the API. Returns at once with the turn to poll. A
message sent while a turn is still working joins that turn (joined: true): Chat takes it
into the work in progress, and the turn's reply and charge cover both messages.

When a turn ends with stop_reason needs_input, Chat waits on the questions in its
reply.questions: send answers (by question index and option label), a message that answers
them in words, or both. The answer starts the next turn (answered: true).

Returns 402 when the balance is below 3 credits for this message and for each turn still
running, 409 for a chat started in the app.

## Path parameters

- `chat_id` string, required

## Request body

- SendChatMessageRequestV1
  - `message` string, nullable: The message to send, in plain text. While Chat waits on its questions (a turn with stop_reason needs_input), a message answers them in words.
  - `answers` ChatAnswerV1[], nullable: Answers to Chat's open questions, one per question you answer. Send answers, a message, or both (the message then adds to the answers).
    - `question_index` integer, required: The question's index, from 0
    - `selected` string[]: The chosen option labels, exactly as given (several only for a multi_select question)
    - `other` string, nullable: A free-text answer instead of or beside the options

## Response `200`

Successful Response

- SendChatMessageResponseV1: Response from POST /v1/chat/{chat_id}/messages.
  - `chat_id` string, required: The chat's id
  - `url` string, required: The chat in the Happenstance app
  - `turn_id` string, required: The turn to poll: the one this message started, or the running turn it joined
  - `status` 'queued' | 'running' | 'completed' | 'failed' | 'cancelled', required: The turn's status
  - `joined` boolean: True when the message joined the turn that was still running: Chat takes it into that turn's work, and the turn's reply and charge cover both messages
  - `answered` boolean: True when the message or answers answered Chat's open questions
  - `warning` string, nullable: Warning message when credit balance is low

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `402`: Payment Required
- `403`: Forbidden
- `404`: Not Found
- `410`: Gone
- `422`: Validation Error
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-10-23** `c8149ed29b44`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/happenstance/apis/happenstance-api/changes/v1/chat/:chat_id/messages/post.md)

---

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