---
title: "Create thread"
method: POST
path: "/threads"
tags: ["Threads"]
---

# Create thread

`POST /threads`

## Request

- Base URL: `https://api.korey.ai/api/v1`
- URL: `https://api.korey.ai/api/v1/threads`
- Auth: HTTP bearer

Creates a thread, optionally with an initial text message. Omit text to upload attachments before sending the first message. Returns 409 on conflict.

## Request body

- object
  - `text` string: Initial message text. Omit to create an empty thread, upload files, and then send the first message.
  - `name` string, nullable: Optional display name for the thread.
  - `is_private` boolean: When true the thread is only visible to its owner. Defaults to false.

## Response `201`

Created

- object
  - `thread_id` string, required: ID of the newly created thread.
  - `message_id` string, nullable, required: ID of the initial message, or null when no initial text was supplied.

## Other responses

- `401`: Unauthorized — Bearer token required or invalid
- `403`: Forbidden — token does not have required scope
- `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)
