Skip to main content
POST
/
v1
/
threads
Create Thread Handler
curl --request POST \
  --url http://localhost:8000/v1/threads \
  --header 'Content-Type: application/json' \
  --data '
{
  "parent_path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "message_for_title": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "path_part_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "materialized_path": "<string>",
  "tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "parent_thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Documentation Index

Fetch the complete documentation index at: https://docs.knowledgestack.ai/llms.txt

Use this file to discover all available pages before exploring further.

Headers

authorization
string | null

Cookies

ks_uat
string | null

Body

application/json

Request to create a new thread.

parent_path_part_id
string<uuid> | null

Parent PathPart ID. When omitted, auto-provisions and uses the user's /users/{user_id}/threads/ folder.

title
string | null

Thread title. Mutually exclusive with message_for_title.

Required string length: 1 - 255
message_for_title
string | null

Message content used solely for automated title generation. This does NOT create a thread message; it is only used to generate the thread title. Mutually exclusive with title.

Required string length: 1 - 4096

Response

Successful Response

Thread response model.

id
string<uuid>
required

Thread ID

path_part_id
string<uuid>
required

PathPart ID

title
string
required

Thread title

materialized_path
string
required

Full materialized path from root

tenant_id
string<uuid>
required

Tenant ID

created_at
string<date-time>
required

Creation timestamp

updated_at
string<date-time>
required

Last update timestamp

parent_thread_id
string<uuid> | null

Parent Thread ID (for subthreads)