---
title: "Create ai chat"
method: POST
path: "/ai_chats"
tags: ["Ai chats"]
---

# Create ai chat

`POST /ai_chats`

Create a new AI chat thread and send the first message to the AI agent.

Required permissions:
 - `ai_chat:create`

## Request body

- object — Parameters for CreateAiChat
  - `agent_identifier` 'general' | 'support' — The AI agent that handles an AI chat.
  - `current_account_id` string, nullable — The unique identifier of the account to set as context for the AI chat (e.g., "biz_XXXXX").
  - `message_attachments` object[], nullable — A list of previously uploaded file attachments to include with the first message.
    - `id` string, required — The ID of an existing file object.
  - `message_source` 'manual' | 'suggestion' | 'link' — The source of an AI chat message
  - `message_text` string, required — The text content of the first message to send to the AI agent.
  - `suggestion_type` string, nullable — The type of suggestion prompt that was clicked, when message_source is 'suggestion'.
  - `title` string, nullable — An optional display title for the AI chat thread (e.g., "Help with billing").

## Response `200`

A successful response

- AiChat — An AI-powered chat conversation belonging to a user, with optional scheduled automation.
  - `agent_identifier` 'general' | 'support', required — The AI agent that handles an AI chat.
  - `blended_token_usage` string, required — The total number of tokens consumed across all messages in this conversation.
  - `created_at` string, date-time, required — The datetime the ai chat was created.
  - `id` string, required — The unique identifier for the ai chat.
  - `last_message_at` string, date-time, nullable, required — The timestamp of the most recent message in this conversation. Null if no messages have been sent yet.
  - `message_count` integer, required — The total number of messages exchanged in this conversation.
  - `notification_preference` 'all' | 'none', required — The notification preference for an AI chat
  - `title` string, nullable, required — A short descriptive title for this AI chat conversation. Null if no title has been set.
  - `updated_at` string, date-time, required — The datetime the ai chat was last updated.
  - `user` object, required — The user who owns this AI chat conversation.
    - `id` string, required — The unique identifier for the user.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `422` — Verification required
- `429` — Too many requests
- `500` — Internal server error

## Changes

> 60 revisions in range; 1 not diffed.

- **2026-09-05** `35b1eba5f203` — 2 info
  - added the new optional request property `agent_identifier`
  - added the required property `agent_identifier` to the response with the `200` status
- **2026-09-03** `697924df40d1` — 1 warning, 1 info
  - removed the request property `current_company_id`
  - added the new optional request property `current_account_id`

[Change history](https://skmtc.dev/whop/apis/whop-api/changes/ai_chats/post.md)

---

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