---
title: "Create a chat thread"
method: POST
path: "/api/v5/ai-chat/threads/"
tags: ["Ai Chat Threads"]
---

# Create a chat thread

`POST /api/v5/ai-chat/threads/`

## Request body

- BodyAiChatThreadsCreateApiV5AiChatThreadsPost
  - `thread` AiChatThreadInCreate, required
    - `title` string, required — Title of the chat thread
    - `gptModel` string — GPT model used

## Response `201`

Successful Response

- AiChatThreadInResponse
  - `thread` AiChatThread, required
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `deletedAt` string, date-time
    - `id` integer
    - `userId` integer, required — User ID associated with the thread
    - `title` string, required — Title of the chat thread
    - `gptModel` string — GPT model used
    - `hidden` boolean — Flag to hide/show the thread

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/pavlok/apis/pavlok-api-v5.md) · [All operations](https://skmtc.net/pavlok/apis/pavlok-api-v5/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pavlok/pavlok-api-v5/revisions/3d192098b1ac/schema)
