Pular para o conteúdo

/api/v1/chat-messages (GET)

GET
/api/v1/chat-messages
curl --request GET \
--url 'https://api.endless.zaia.app/api/v1/chat-messages?chatId=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0&limit=250'

Retrieves multiple chat messages.

chatId
required

A UUID v4 string that identifies an entity.

string format: uuid

A UUID v4 string that identifies an entity.

chatThreadId

A UUID v4 string that identifies an entity.

string format: uuid

A UUID v4 string that identifies an entity.

joins
Any of:
Array<string>
Allowed values: chat-message-follow-ups senders
pagination
object
limit
number
default: 250 >= 1 <= 1000
ticketIds
Any of:
Array<string>

Retrieves all chat messages for the specified chat.

Media typeapplication/json
Any of:
Array<object>
object
createdAt
required
string format: date-time
id
required

A UUID v4 string that identifies an entity.

string format: uuid
updatedAt
required
string format: date-time
chatId
required

The chat ID associated with the message.

string format: uuid
chatThreadId
required

The id of the chat thread that the message belongs to.

string format: uuid
nullable
content
required

The content of the message.

string
0 <= 100000 characters
detail
required

The structured detail payload associated with the message.

object
attachments
required

The attachments associated with the chat message.

Array
Any of:
object
file
required

The file identifier or path.

string
>= 1 characters
id
required

The attachment ID associated with this payload.

string format: uuid
description
required

The description of the PNG image.

string
>= 3 characters <= 250 characters
extension
required

The attachment subtype represented by this payload.

string
Allowed values: png
name
required

The display name of the PNG file.

string
>= 3 characters <= 50 characters
delivery

The delivery status for external channel messages.

Array
default:
One of:
object
content
required
Any of:
object
attachmentsIds
required

The attachment IDs included in the delivery payload.

Array<string>
text
required

The text chunk included in the delivery payload.

string
id
required

The stable identifier of this delivery entry.

string format: uuid
provider
required

The external provider that received the delivery payload.

string
Allowed values: waha whatsapp instagram telegram
timestamp
required

When the delivery payload was recorded.

string format: date-time
nullable
externalId
required

External reference in the integrated system.

string
>= 3 characters <= 250 characters
status
required

The delivery status represented by this payload.

string
Allowed values: sent
referral

Referral metadata when the message originated from Click-to-WhatsApp.

object
body
required

The primary text from the ad or post.

string
nullable
ctwaClid
required

The Click-to-WhatsApp click identifier.

string
nullable
headline
required

The headline from the ad or post.

string
nullable
imageUrl
required

The image URL when the ad uses image media.

string
nullable
mediaType
required

The media type used in the ad or post.

string
nullable
Allowed values: image video
sourceId
required

The Meta ID for the ad or post.

string
sourceType
required

Whether the referral came from an ad or a post.

string
Allowed values: ad post
sourceUrl
required

The URL of the ad or post.

string
thumbnailUrl
required

The thumbnail URL when the ad uses video media.

string
nullable
videoUrl
required

The video URL when the ad uses video media.

string
nullable
vibe
object
journeyInsight
object
state
required

Server-controlled journey insight collection state for Vibe Ask mode.

string
Allowed values: none awaiting-desired-experience reported
summary

Sanitized journey insight summary reported to the product team.

string
<= 2000 characters
mode
required

Effective Vibe Agent mode for this message.

string
Allowed values: ask build
externalId
required

External reference in the integrated system.

string
nullable >= 3 characters <= 250 characters
rawContent
required

The raw content of the message as it was generated by the assistant.

string
nullable 0 <= 100000 characters
role
required

The role of the actor that produced the message.

string
Allowed values: user assistant support system
senderId
required

The super identity ID of the sender (agents, squads, users or external users) of the message.

string format: uuid
nullable
chatMessageFollowUp
required
object
createdAt
required
string format: date-time
id
required

A UUID v4 string that identifies an entity.

string format: uuid
updatedAt
required
string format: date-time
chatId
required

The id of the chat this follow-up belongs to.

string format: uuid
chatMessageId
required

The id of the chat message this follow-up belongs to.

string format: uuid
nullable
dueDate
required

The date and time when the follow-up message should be sent.

string format: date-time
finishedAt
required

The date and time when the follow-up went from pending to any other status.

string format: date-time
nullable
message
required

The follow-up message content.

string
>= 1 characters
reason
required

The reason why the follow-up failed.

string
nullable
status
required

The current status of the follow-up.

string
Allowed values: pending sent failed cancelled
triggerChatMessageId
required

The id of the chat message that triggered the follow-up.

string format: uuid
senderSuperIdentity
required
object
createdAt
required
string format: date-time
id
required

A UUID v4 string that identifies an entity.

string format: uuid
updatedAt
required
string format: date-time
entity
required
string
Allowed values: agents squads users externalUsers workflows
sender
required
Any of:
object
createdAt
required
string format: date-time
id
required

A UUID v4 string that identifies an entity.

string format: uuid
isRemoved
required
boolean
referenceId
required

The ID of the original entity in production.

string format: uuid
nullable
updatedAt
required
string format: date-time
versionId
required

A UUID v4 string that identifies an entity.

string format: uuid
codeRuntime
required

Whether the agent should be able to execute JavaScript code using the Code Runtime tool.

boolean
internalName
required

The internal name of the agent. For internal use only.

string
nullable >= 3 characters <= 50 characters
iterations
required

The number of iterations (steps) the agent can execute in a single execution.

number
>= 2 <= 100
llm
required

The LLM model key to use for the agent.

string
Allowed values: claude-haiku-4-5 claude-opus-4-8 claude-opus-4-6 claude-opus-4-5 claude-sonnet-4-6 claude-sonnet-4-5 gpt-5.2 gpt-5.5 gpt-5.4 gpt-5.4-mini gpt-5.4-nano gpt-5.6-luna gpt-5.6-sol gpt-5.6-terra gemini-2.5-flash gemini-2.5-pro gemini-3.5-flash gemini-3-flash gemini-3-pro gemini-3.1-pro kimi-k2.5 kimi-k2.6 grok-4.3 grok-4.5
llmProviderId
required

The id of the LLM provider to use for the agent.

string format: uuid
nullable
name
required

The name of the agent.

string
>= 3 characters <= 50 characters
picture
required

The picture of the agent.

string
nullable
planning
required

Whether the agent should plan before each execution.

boolean
prompt
required

The main description of the agent’s behavior.

string
>= 1 characters <= 10000 characters
reasoningMode
required

The reasoning mode to use for the agent. If null, reasoning will be disabled.

string
nullable
Allowed values: low medium high xhigh
role
required

The role of the agent. Particularly useful to give other agents context of what the agent does.

string
>= 1 characters <= 250 characters
superIdentityId
required

The super identity ID associated with the agent.

string format: uuid
temperature
required

The temperature to use for the agent. The lower the more deterministic. The higher the more creative.

number
<= 2
timezone
required

The timezone to use for the agent. If null, no timezone will be used.

string
nullable
Allowed values: Africa/Cairo Africa/Johannesburg America/Chicago America/Denver America/Los_Angeles America/New_York America/Sao_Paulo America/Manaus Asia/Dubai Asia/Kolkata Asia/Shanghai Asia/Singapore Asia/Tokyo Australia/Sydney Europe/Berlin Europe/London Europe/Moscow Europe/Paris Pacific/Auckland Pacific/Auckland2 UTC auto
toolCount
required

The number of tools currently associated with the agent.

integer
voiceId
required

The TTS voice to use for audio responses. Null when disabled for the agent.

string format: uuid
nullable
workspaceId
required

The workspace ID that owns the agent.

string format: uuid
Example
[
{
"detail": {
"attachments": [
{
"extension": "png"
}
],
"delivery": [],
"referral": null,
"vibe": {
"journeyInsight": {
"state": "none"
},
"mode": "ask"
}
},
"role": "user",
"chatMessageFollowUp": {
"status": "pending"
},
"senderSuperIdentity": {
"entity": "agents",
"sender": {
"llm": "claude-haiku-4-5",
"reasoningMode": "low",
"timezone": "Africa/Cairo"
}
}
}
]

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"
}
}

Chat 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"
}
}