---
title: "Send message"
method: POST
path: "/threads/{thread-id}/messages"
tags: ["Threads"]
---

# Send message

`POST /threads/{thread-id}/messages`

## Request

- Base URL: `https://api.korey.ai/api/v1`
- URL: `https://api.korey.ai/api/v1/threads/{thread-id}/messages`
- Auth: HTTP bearer

Sends a user message with optional uploaded attachments to a thread and triggers AI processing.

The thread must be in `ready` state — the only state in which new messages are
accepted. Returns 409 if the thread is not ready.

After sending, the thread transitions:
- `waiting` — message is queued for the AI processor
- `active`  — the LLM is generating a response
- `ready`   — response is complete; the thread accepts new messages again

Use the SSE stream endpoint or poll the thread `state` field to know when
the thread returns to `ready`.

## Path parameters

- `thread-id` string, uuid, required

## Request body

- object
  - `text` string, required: The user message text to send.
  - `attachment_ids` string[]: IDs of files uploaded to this thread, in display order. May reference files from multiple upload requests, up to the thread limit of 25 attachments.

## Response `201`

Created

- object
  - `message_id` string, required: ID of the newly created message. Use this to poll or stream the AI response.

## Other responses

- `401`: Unauthorized — Bearer token required or invalid
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict

---

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