Pular para o conteúdo

/api/v1/chats (POST)

POST
/api/v1/chats
curl --request POST \
--url https://api.endless.zaia.app/api/v1/chats \
--header 'Content-Type: application/json' \
--data '{ "channelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "ownerId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "privateMemory": {}, "publicMemory": {}, "title": "example" }'

Creates a new chat.

Media typeapplication/json
object
channelId
required

A UUID v4 string that identifies an entity.

string format: uuid
nullable
ownerId
required

The super identity ID of the chat owner. Can refer to users.superIdentityId or externalUsers.superIdentityId.

string format: uuid
privateMemory
object
key
additional properties
Any of:
string
publicMemory
object
key
additional properties
Any of:
string
title
required
string
nullable

The chat was created.

Media typeapplication/json
object
createdAt
required
string format: date-time
id
required

A UUID v4 string that identifies an entity.

string format: uuid
isRemoved
required
boolean
updatedAt
required
string format: date-time
channelId
required

A UUID v4 string that identifies an entity.

string format: uuid
nullable
conversationVersion
required
integer
currentResponderId
required

A UUID v4 string that identifies an entity.

string format: uuid
nullable
lastActivityAt
required
string format: date-time
lastChatMessageCreatedAt
required
string format: date-time
nullable
ownerId
required

The super identity ID of the chat owner. Can refer to users.superIdentityId or externalUsers.superIdentityId.

string format: uuid
privateMemory
required
object
key
additional properties
Any of:
string
publicMemory
required
object
key
additional properties
Any of:
string
responderId
required

The super identity ID of the current chat responder. Can refer to agents.superIdentityId or squads.superIdentityId.

string format: uuid
title
required
string
nullable
workspaceId
required

A UUID v4 string that identifies an entity.

string format: uuid
Examplegenerated
{
"createdAt": "2026-04-15T12:00:00Z",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"isRemoved": true,
"updatedAt": "2026-04-15T12:00:00Z",
"channelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"conversationVersion": 1,
"currentResponderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"lastActivityAt": "2026-04-15T12:00:00Z",
"lastChatMessageCreatedAt": "2026-04-15T12:00:00Z",
"ownerId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"privateMemory": {
"additionalProperty": "example"
},
"publicMemory": {
"additionalProperty": "example"
},
"responderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"title": "example",
"workspaceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Invalid data provided.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}

Unauthorized.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}

Channel or responder not found.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}