Skip to main content
POST
Create ai chat
Required permissions:
  • ai_chat:create

Yetkilendirmeler

Authorization
string
header
gerekli

An Account API key, account-scoped JWT, App API key, or user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************.

Scopes

ai_chat:create

Gövde

application/json

Parameters for CreateAiChat

message_text
string
gerekli

The text content of the first message to send to the AI agent.

agent_identifier
enum<string> | null

The AI agent that handles the chat. Defaults to support.

Mevcut seçenekler:
general,
support
current_account_id
string | null

The unique identifier of the account to set as context for the AI chat (e.g., "biz_XXXXX").

message_attachments
FileInputWithId · object[] | null

A list of previously uploaded file attachments to include with the first message.

message_source
enum<string> | null

The source of the message.

Mevcut seçenekler:
manual,
suggestion,
link
suggestion_type
string | null

The type of suggestion prompt that was clicked, when message_source is 'suggestion'.

title
string | null

An optional display title for the AI chat thread (e.g., "Help with billing").

Yanıt

A successful response

An AI-powered chat conversation belonging to a user, with optional scheduled automation.

agent_identifier
enum<string>
gerekli

The AI agent that handles this chat. Set when the chat is created and fixed for its lifetime.

Mevcut seçenekler:
general,
support
blended_token_usage
string
gerekli

The total number of tokens consumed across all messages in this conversation.

Örnek:

"123.45"

created_at
string<date-time>
gerekli

The datetime the ai chat was created.

Örnek:

"2023-12-01T05:00:00.401Z"

id
string
gerekli

The unique identifier for the ai chat.

Örnek:

"aich_xxxxxxxxxxxxx"

last_message_at
string<date-time> | null
gerekli

The timestamp of the most recent message in this conversation. Null if no messages have been sent yet.

Örnek:

"2023-12-01T05:00:00.401Z"

message_count
integer
gerekli

The total number of messages exchanged in this conversation.

Örnek:

42

notification_preference
enum<string>
gerekli

The notification preference for this AI chat. all delivers AI chat notifications and badges, while none mutes them.

Mevcut seçenekler:
all,
none
title
string | null
gerekli

A short descriptive title for this AI chat conversation. Null if no title has been set.

Örnek:

"Weekly Revenue Analysis"

updated_at
string<date-time>
gerekli

The datetime the ai chat was last updated.

Örnek:

"2023-12-01T05:00:00.401Z"

user
object
gerekli

The user who owns this AI chat conversation.