---
title: "Create a new chat message in a thread"
method: POST
path: "/api/v5/ai-chat/messages/"
tags: ["Ai Chat Messages"]
---

# Create a new chat message in a thread

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

## Request

- Base URL: `https://api.pavlok.com`
- URL: `https://api.pavlok.com/api/v5/ai-chat/messages/`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/pavlok/apis/pavlok-api-v5/docs/api/v5/ai-chat/messages/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new message in a specific thread.

## Request body

- BodyAiChatMessagesCreateApiV5AiChatMessagesPost
  - `message` AiChatMessageInCreateRestricted, required
    - `threadId` integer
    - `content` string, required: Full message content

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pavlok/apis/pavlok-api-v5.md) - [All operations](https://skmtc.dev/pavlok/apis/pavlok-api-v5/llms.txt) - [OpenAPI document](https://skmtc.dev/pavlok/apis/pavlok-api-v5/revisions/3d192098b1ac?raw)
