POST
/
v1
/
{account_id}
/
{project_id}
/
chat
/
create

Authorizations

x-api-key
string
header
required

Path Parameters

account_id
string
required

Account ID in the format ACCOUNT-xxxxxxxx. Uniquely identifies your PolyAI account.

project_id
string
required

Project ID in the format PROJECT-xxxxxxxx. Combined with the account_id, this uniquely identifies a PolyAI project.

Body

application/json
message
string

The initial message content sent to start the chat session.

metadata
object

Optional metadata to provide additional context for the chat session. This can include custom attributes or other relevant information.

user_id
string

Unique identifier for the user initiating the chat session. Useful for associating the chat with a specific user in your system.

Response

201 - application/json
chat_id
string

A unique identifier for the created chat session. Used in subsequent operations.