---
title: "GET /api/v1/chat-messages"
method: GET
path: "/api/v1/chat-messages"
tags: ["Chat Messages"]
---

# GET /api/v1/chat-messages

`GET /api/v1/chat-messages`

Retrieves multiple chat messages.

## Query parameters

- `chatId` string, uuid, required — A UUID v4 string that identifies an entity.
- `chatThreadId` string, uuid — A UUID v4 string that identifies an entity.
- `joins` union
  - string[]
  - 'chat-message-follow-ups' | 'senders'
- `pagination` object
  - `limit` number
- `ticketIds` union
  - string[]
  - string, uuid — A UUID v4 string that identifies an entity.

## Headers

- `authorization` string, required — The API key to use for authentication. Can be created in the api keys section on the workspace settings page.

## Response `200`

Retrieves all chat messages for the specified chat.

- union
  - object[]
    - `createdAt` string, date-time, required
    - `id` string, uuid, required — A UUID v4 string that identifies an entity.
    - `updatedAt` string, date-time, required
    - `chatId` string, uuid, required — The chat ID associated with the message.
    - `chatThreadId` string, uuid, nullable, required — The id of the chat thread that the message belongs to.
    - `content` string, required — The content of the message.
    - `detail` object, required — The structured detail payload associated with the message.
      - `attachments` union[], required — The attachments associated with the chat message.
        - union
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the PNG image.
            - `extension` 'png', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the PNG file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the PDF file.
            - `extension` 'pdf', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the PDF file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `extension` 'wav', required — The attachment subtype represented by this payload.
            - `mode` 'attachment' | 'message', required — The mode of the audio attachment. "attachment" sends it as an attachment and "message" sends it as the main message.
            - `summary` string, required — The summary of the audio file.
            - `transcription` string, required — The transcription of the audio file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the markdown file.
            - `extension` 'md', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the markdown file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the text file.
            - `extension` 'txt', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the text file.
      - `delivery` union[] — The delivery status for external channel messages.
        - union
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `externalId` string, required — External reference in the integrated system.
            - `status` 'sent', required — The delivery status represented by this payload.
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `error` unknown
            - `status` 'failed', required — The delivery status represented by this payload.
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `status` 'pending', required — The delivery status represented by this payload.
      - `referral` object, nullable — Referral metadata when the message originated from Click-to-WhatsApp.
        - `body` string, nullable, required — The primary text from the ad or post.
        - `ctwaClid` string, nullable, required — The Click-to-WhatsApp click identifier.
        - `headline` string, nullable, required — The headline from the ad or post.
        - `imageUrl` string, nullable, required — The image URL when the ad uses image media.
        - `mediaType` 'image' | 'video' | 'null', nullable, required — The media type used in the ad or post.
        - `sourceId` string, required — The Meta ID for the ad or post.
        - `sourceType` 'ad' | 'post', required — Whether the referral came from an ad or a post.
        - `sourceUrl` string, required — The URL of the ad or post.
        - `thumbnailUrl` string, nullable, required — The thumbnail URL when the ad uses video media.
        - `videoUrl` string, nullable, required — The video URL when the ad uses video media.
    - `externalId` string, nullable, required — External reference in the integrated system.
    - `rawContent` string, nullable, required — The raw content of the message as it was generated by the assistant.
    - `role` 'user' | 'assistant' | 'support' | 'system', required — The role of the actor that produced the message.
    - `senderId` string, uuid, nullable, required — The super identity ID of the sender (agents, squads, users or external users) of the message.
    - `chatMessageFollowUp` object, nullable, required
      - `createdAt` string, date-time, required
      - `id` string, uuid, required — A UUID v4 string that identifies an entity.
      - `updatedAt` string, date-time, required
      - `chatId` string, uuid, required — The id of the chat this follow-up belongs to.
      - `chatMessageId` string, uuid, nullable, required — The id of the chat message this follow-up belongs to.
      - `dueDate` string, date-time, required — The date and time when the follow-up message should be sent.
      - `finishedAt` string, date-time, nullable, required — The date and time when the follow-up went from pending to any other status.
      - `message` string, required — The follow-up message content.
      - `reason` string, nullable, required — The reason why the follow-up failed.
      - `status` 'pending' | 'sent' | 'failed' | 'cancelled', required — The current status of the follow-up.
      - `triggerChatMessageId` string, uuid, required — The id of the chat message that triggered the follow-up.
    - `senderSuperIdentity` object, nullable, required
      - `createdAt` string, date-time, required
      - `id` string, uuid, required — A UUID v4 string that identifies an entity.
      - `updatedAt` string, date-time, required
      - `entity` 'agents' | 'squads' | 'users' | 'externalUsers' | 'workflows', required
      - `sender` union, required
        - object
          - `createdAt` string, date-time, required
          - `id` string, uuid, required — A UUID v4 string that identifies an entity.
          - `isRemoved` boolean, required
          - `referenceId` string, uuid, nullable, required — The ID of the original entity in production.
          - `updatedAt` string, date-time, required
          - `versionId` string, uuid, required — A UUID v4 string that identifies an entity.
          - `codeRuntime` boolean, required — Whether the agent should be able to execute JavaScript code using the Code Runtime tool.
          - `internalName` string, nullable, required — The internal name of the agent. For internal use only.
          - `iterations` number, required — The number of iterations (steps) the agent can execute in a single execution.
          - `llm` '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' | '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', required — The LLM model key to use for the agent.
          - `llmProviderId` string, uuid, nullable, required — The id of the LLM provider to use for the agent.
          - `name` string, required — The name of the agent.
          - `picture` string, nullable, required — The picture of the agent.
          - `planning` boolean, required — Whether the agent should plan before each execution.
          - `prompt` string, required — The main description of the agent's behavior.
          - `reasoningMode` 'low' | 'medium' | 'high' | 'xhigh' | 'null', nullable, required — The reasoning mode to use for the agent. If null, reasoning will be disabled.
          - `role` string, required — The role of the agent. Particularly useful to give other agents context of what the agent does.
          - `superIdentityId` string, uuid, required — The super identity ID associated with the agent.
          - `temperature` number, required — The temperature to use for the agent. The lower the more deterministic. The higher the more creative.
          - `timezone` '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' | 'null', nullable, required — The timezone to use for the agent. If null, no timezone will be used.
          - `toolCount` integer, required — The number of tools currently associated with the agent.
          - `voiceId` string, uuid, nullable, required — The TTS voice to use for audio responses. Null when disabled for the agent.
          - `workspaceId` string, uuid, required — The workspace ID that owns the agent.
        - object
          - `createdAt` string, date-time, required
          - `id` string, uuid, required — A UUID v4 string that identifies an entity.
          - `isRemoved` boolean, required
          - `referenceId` string, uuid, nullable, required — The ID of the original entity in production.
          - `updatedAt` string, date-time, required
          - `versionId` string, uuid, required — A UUID v4 string that identifies an entity.
          - `description` string, nullable, required — The internal description of the squad.
          - `mode` 'hierarchical' | 'flat', required — The management mode. In flat, agents redirect the chat to one another. In hierarchical, all iterations are intermediated by the manager.
          - `name` string, required — The display name of the squad.
          - `picture` string, nullable, required — The picture associated with the squad.
          - `superIdentityId` string, uuid, required — The super identity ID associated with the squad.
          - `workspaceId` string, uuid, required — The workspace ID that owns the squad.
        - object
          - `createdAt` string, date-time, required
          - `id` string, uuid, required — A UUID v4 string that identifies an entity.
          - `updatedAt` string, date-time, required
          - `brandId` string, uuid, nullable, required — The brand ID associated with the user.
          - `clientReferenceId` string, nullable, required — The external client reference ID associated with the user.
          - `email` string, email, required — The email address of the user.
          - `emailStatus` 'pending' | 'verified', required — The email verification status of the user.
          - `firstAccessAt` string, date-time, nullable, required — When the user first accessed the platform.
          - `gtm` object, nullable, required — The GTM parameters to be used in tracking events for the user.
          - `language` 'enUs' | 'esEs' | 'ptBr', required — The preferred language configured for the user.
          - `lastAuthenticationAt` string, date-time, nullable, required — When the user last authenticated.
          - `metadata` object, nullable, required — Metadata to be used in tracking events for the user.
          - `name` string, nullable, required — The display name of the user.
          - `phoneNumber` string, nullable, required
          - `picture` string, nullable, required — The picture associated with the user.
          - `superIdentityId` string, uuid, required — The super identity ID associated with the user.
          - `whiteLabelId` string, uuid, nullable, required — The white label ID associated with the user, when one exists.
        - object
          - `createdAt` string, date-time, required
          - `id` string, uuid, required — A UUID v4 string that identifies an entity.
          - `updatedAt` string, date-time, required
          - `blocked` boolean, required — Whether the external user is blocked.
          - `channelId` string, uuid, required — The ID of the channel associated with the external user.
          - `externalId` string, nullable, required — External reference in the integrated system.
          - `externalUserGroupId` string, uuid, nullable, required — The ID of the external user group associated with the external user.
          - `identifier` string, nullable, required — A unique identifier of the external user (usernames, emails, phone numbers and etc).
          - `name` string, nullable, required — The display name of the external user.
          - `superIdentityId` string, uuid, required — The ID of the super identity associated with the external user.
          - `tierId` string, uuid, nullable, required — The ID of the tier associated with the external user.
          - `workspaceId` string, uuid, required — The ID of the workspace associated with the external user.
  - object[]
    - `createdAt` string, date-time, required
    - `id` string, uuid, required — A UUID v4 string that identifies an entity.
    - `updatedAt` string, date-time, required
    - `chatId` string, uuid, required — The chat ID associated with the message.
    - `chatThreadId` string, uuid, nullable, required — The id of the chat thread that the message belongs to.
    - `content` string, required — The content of the message.
    - `detail` object, required — The structured detail payload associated with the message.
      - `attachments` union[], required — The attachments associated with the chat message.
        - union
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the PNG image.
            - `extension` 'png', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the PNG file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the PDF file.
            - `extension` 'pdf', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the PDF file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `extension` 'wav', required — The attachment subtype represented by this payload.
            - `mode` 'attachment' | 'message', required — The mode of the audio attachment. "attachment" sends it as an attachment and "message" sends it as the main message.
            - `summary` string, required — The summary of the audio file.
            - `transcription` string, required — The transcription of the audio file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the markdown file.
            - `extension` 'md', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the markdown file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the text file.
            - `extension` 'txt', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the text file.
      - `delivery` union[] — The delivery status for external channel messages.
        - union
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `externalId` string, required — External reference in the integrated system.
            - `status` 'sent', required — The delivery status represented by this payload.
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `error` unknown
            - `status` 'failed', required — The delivery status represented by this payload.
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `status` 'pending', required — The delivery status represented by this payload.
      - `referral` object, nullable — Referral metadata when the message originated from Click-to-WhatsApp.
        - `body` string, nullable, required — The primary text from the ad or post.
        - `ctwaClid` string, nullable, required — The Click-to-WhatsApp click identifier.
        - `headline` string, nullable, required — The headline from the ad or post.
        - `imageUrl` string, nullable, required — The image URL when the ad uses image media.
        - `mediaType` 'image' | 'video' | 'null', nullable, required — The media type used in the ad or post.
        - `sourceId` string, required — The Meta ID for the ad or post.
        - `sourceType` 'ad' | 'post', required — Whether the referral came from an ad or a post.
        - `sourceUrl` string, required — The URL of the ad or post.
        - `thumbnailUrl` string, nullable, required — The thumbnail URL when the ad uses video media.
        - `videoUrl` string, nullable, required — The video URL when the ad uses video media.
    - `externalId` string, nullable, required — External reference in the integrated system.
    - `rawContent` string, nullable, required — The raw content of the message as it was generated by the assistant.
    - `role` 'user' | 'assistant' | 'support' | 'system', required — The role of the actor that produced the message.
    - `senderId` string, uuid, nullable, required — The super identity ID of the sender (agents, squads, users or external users) of the message.
    - `senderSuperIdentity` object, nullable, required
      - `createdAt` string, date-time, required
      - `id` string, uuid, required — A UUID v4 string that identifies an entity.
      - `updatedAt` string, date-time, required
      - `entity` 'agents' | 'squads' | 'users' | 'externalUsers' | 'workflows', required
      - `sender` union, required
        - object
          - `createdAt` string, date-time, required
          - `id` string, uuid, required — A UUID v4 string that identifies an entity.
          - `isRemoved` boolean, required
          - `referenceId` string, uuid, nullable, required — The ID of the original entity in production.
          - `updatedAt` string, date-time, required
          - `versionId` string, uuid, required — A UUID v4 string that identifies an entity.
          - `codeRuntime` boolean, required — Whether the agent should be able to execute JavaScript code using the Code Runtime tool.
          - `internalName` string, nullable, required — The internal name of the agent. For internal use only.
          - `iterations` number, required — The number of iterations (steps) the agent can execute in a single execution.
          - `llm` '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' | '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', required — The LLM model key to use for the agent.
          - `llmProviderId` string, uuid, nullable, required — The id of the LLM provider to use for the agent.
          - `name` string, required — The name of the agent.
          - `picture` string, nullable, required — The picture of the agent.
          - `planning` boolean, required — Whether the agent should plan before each execution.
          - `prompt` string, required — The main description of the agent's behavior.
          - `reasoningMode` 'low' | 'medium' | 'high' | 'xhigh' | 'null', nullable, required — The reasoning mode to use for the agent. If null, reasoning will be disabled.
          - `role` string, required — The role of the agent. Particularly useful to give other agents context of what the agent does.
          - `superIdentityId` string, uuid, required — The super identity ID associated with the agent.
          - `temperature` number, required — The temperature to use for the agent. The lower the more deterministic. The higher the more creative.
          - `timezone` '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' | 'null', nullable, required — The timezone to use for the agent. If null, no timezone will be used.
          - `toolCount` integer, required — The number of tools currently associated with the agent.
          - `voiceId` string, uuid, nullable, required — The TTS voice to use for audio responses. Null when disabled for the agent.
          - `workspaceId` string, uuid, required — The workspace ID that owns the agent.
        - object
          - `createdAt` string, date-time, required
          - `id` string, uuid, required — A UUID v4 string that identifies an entity.
          - `isRemoved` boolean, required
          - `referenceId` string, uuid, nullable, required — The ID of the original entity in production.
          - `updatedAt` string, date-time, required
          - `versionId` string, uuid, required — A UUID v4 string that identifies an entity.
          - `description` string, nullable, required — The internal description of the squad.
          - `mode` 'hierarchical' | 'flat', required — The management mode. In flat, agents redirect the chat to one another. In hierarchical, all iterations are intermediated by the manager.
          - `name` string, required — The display name of the squad.
          - `picture` string, nullable, required — The picture associated with the squad.
          - `superIdentityId` string, uuid, required — The super identity ID associated with the squad.
          - `workspaceId` string, uuid, required — The workspace ID that owns the squad.
        - object
          - `createdAt` string, date-time, required
          - `id` string, uuid, required — A UUID v4 string that identifies an entity.
          - `updatedAt` string, date-time, required
          - `brandId` string, uuid, nullable, required — The brand ID associated with the user.
          - `clientReferenceId` string, nullable, required — The external client reference ID associated with the user.
          - `email` string, email, required — The email address of the user.
          - `emailStatus` 'pending' | 'verified', required — The email verification status of the user.
          - `firstAccessAt` string, date-time, nullable, required — When the user first accessed the platform.
          - `gtm` object, nullable, required — The GTM parameters to be used in tracking events for the user.
          - `language` 'enUs' | 'esEs' | 'ptBr', required — The preferred language configured for the user.
          - `lastAuthenticationAt` string, date-time, nullable, required — When the user last authenticated.
          - `metadata` object, nullable, required — Metadata to be used in tracking events for the user.
          - `name` string, nullable, required — The display name of the user.
          - `phoneNumber` string, nullable, required
          - `picture` string, nullable, required — The picture associated with the user.
          - `superIdentityId` string, uuid, required — The super identity ID associated with the user.
          - `whiteLabelId` string, uuid, nullable, required — The white label ID associated with the user, when one exists.
        - object
          - `createdAt` string, date-time, required
          - `id` string, uuid, required — A UUID v4 string that identifies an entity.
          - `updatedAt` string, date-time, required
          - `blocked` boolean, required — Whether the external user is blocked.
          - `channelId` string, uuid, required — The ID of the channel associated with the external user.
          - `externalId` string, nullable, required — External reference in the integrated system.
          - `externalUserGroupId` string, uuid, nullable, required — The ID of the external user group associated with the external user.
          - `identifier` string, nullable, required — A unique identifier of the external user (usernames, emails, phone numbers and etc).
          - `name` string, nullable, required — The display name of the external user.
          - `superIdentityId` string, uuid, required — The ID of the super identity associated with the external user.
          - `tierId` string, uuid, nullable, required — The ID of the tier associated with the external user.
          - `workspaceId` string, uuid, required — The ID of the workspace associated with the external user.
  - object[]
    - `createdAt` string, date-time, required
    - `id` string, uuid, required — A UUID v4 string that identifies an entity.
    - `updatedAt` string, date-time, required
    - `chatId` string, uuid, required — The chat ID associated with the message.
    - `chatThreadId` string, uuid, nullable, required — The id of the chat thread that the message belongs to.
    - `content` string, required — The content of the message.
    - `detail` object, required — The structured detail payload associated with the message.
      - `attachments` union[], required — The attachments associated with the chat message.
        - union
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the PNG image.
            - `extension` 'png', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the PNG file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the PDF file.
            - `extension` 'pdf', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the PDF file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `extension` 'wav', required — The attachment subtype represented by this payload.
            - `mode` 'attachment' | 'message', required — The mode of the audio attachment. "attachment" sends it as an attachment and "message" sends it as the main message.
            - `summary` string, required — The summary of the audio file.
            - `transcription` string, required — The transcription of the audio file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the markdown file.
            - `extension` 'md', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the markdown file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the text file.
            - `extension` 'txt', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the text file.
      - `delivery` union[] — The delivery status for external channel messages.
        - union
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `externalId` string, required — External reference in the integrated system.
            - `status` 'sent', required — The delivery status represented by this payload.
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `error` unknown
            - `status` 'failed', required — The delivery status represented by this payload.
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `status` 'pending', required — The delivery status represented by this payload.
      - `referral` object, nullable — Referral metadata when the message originated from Click-to-WhatsApp.
        - `body` string, nullable, required — The primary text from the ad or post.
        - `ctwaClid` string, nullable, required — The Click-to-WhatsApp click identifier.
        - `headline` string, nullable, required — The headline from the ad or post.
        - `imageUrl` string, nullable, required — The image URL when the ad uses image media.
        - `mediaType` 'image' | 'video' | 'null', nullable, required — The media type used in the ad or post.
        - `sourceId` string, required — The Meta ID for the ad or post.
        - `sourceType` 'ad' | 'post', required — Whether the referral came from an ad or a post.
        - `sourceUrl` string, required — The URL of the ad or post.
        - `thumbnailUrl` string, nullable, required — The thumbnail URL when the ad uses video media.
        - `videoUrl` string, nullable, required — The video URL when the ad uses video media.
    - `externalId` string, nullable, required — External reference in the integrated system.
    - `rawContent` string, nullable, required — The raw content of the message as it was generated by the assistant.
    - `role` 'user' | 'assistant' | 'support' | 'system', required — The role of the actor that produced the message.
    - `senderId` string, uuid, nullable, required — The super identity ID of the sender (agents, squads, users or external users) of the message.
    - `chatMessageFollowUp` object, nullable, required
      - `createdAt` string, date-time, required
      - `id` string, uuid, required — A UUID v4 string that identifies an entity.
      - `updatedAt` string, date-time, required
      - `chatId` string, uuid, required — The id of the chat this follow-up belongs to.
      - `chatMessageId` string, uuid, nullable, required — The id of the chat message this follow-up belongs to.
      - `dueDate` string, date-time, required — The date and time when the follow-up message should be sent.
      - `finishedAt` string, date-time, nullable, required — The date and time when the follow-up went from pending to any other status.
      - `message` string, required — The follow-up message content.
      - `reason` string, nullable, required — The reason why the follow-up failed.
      - `status` 'pending' | 'sent' | 'failed' | 'cancelled', required — The current status of the follow-up.
      - `triggerChatMessageId` string, uuid, required — The id of the chat message that triggered the follow-up.
  - object[]
    - `createdAt` string, date-time, required
    - `id` string, uuid, required — A UUID v4 string that identifies an entity.
    - `updatedAt` string, date-time, required
    - `chatId` string, uuid, required — The chat ID associated with the message.
    - `chatThreadId` string, uuid, nullable, required — The id of the chat thread that the message belongs to.
    - `content` string, required — The content of the message.
    - `detail` object, required — The structured detail payload associated with the message.
      - `attachments` union[], required — The attachments associated with the chat message.
        - union
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the PNG image.
            - `extension` 'png', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the PNG file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the PDF file.
            - `extension` 'pdf', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the PDF file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `extension` 'wav', required — The attachment subtype represented by this payload.
            - `mode` 'attachment' | 'message', required — The mode of the audio attachment. "attachment" sends it as an attachment and "message" sends it as the main message.
            - `summary` string, required — The summary of the audio file.
            - `transcription` string, required — The transcription of the audio file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the markdown file.
            - `extension` 'md', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the markdown file.
          - object
            - `file` string, required — The file identifier or path.
            - `id` string, uuid, required — The attachment ID associated with this payload.
            - `description` string, required — The description of the text file.
            - `extension` 'txt', required — The attachment subtype represented by this payload.
            - `name` string, required — The display name of the text file.
      - `delivery` union[] — The delivery status for external channel messages.
        - union
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `externalId` string, required — External reference in the integrated system.
            - `status` 'sent', required — The delivery status represented by this payload.
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `error` unknown
            - `status` 'failed', required — The delivery status represented by this payload.
          - object
            - `content` union, required — The content payload delivered through the external provider.
              - …
            - `id` string, uuid, required — The stable identifier of this delivery entry.
            - `provider` 'waha' | 'whatsapp' | 'instagram' | 'telegram', required — The external provider that received the delivery payload.
            - `timestamp` string, date-time, nullable, required — When the delivery payload was recorded.
            - `status` 'pending', required — The delivery status represented by this payload.
      - `referral` object, nullable — Referral metadata when the message originated from Click-to-WhatsApp.
        - `body` string, nullable, required — The primary text from the ad or post.
        - `ctwaClid` string, nullable, required — The Click-to-WhatsApp click identifier.
        - `headline` string, nullable, required — The headline from the ad or post.
        - `imageUrl` string, nullable, required — The image URL when the ad uses image media.
        - `mediaType` 'image' | 'video' | 'null', nullable, required — The media type used in the ad or post.
        - `sourceId` string, required — The Meta ID for the ad or post.
        - `sourceType` 'ad' | 'post', required — Whether the referral came from an ad or a post.
        - `sourceUrl` string, required — The URL of the ad or post.
        - `thumbnailUrl` string, nullable, required — The thumbnail URL when the ad uses video media.
        - `videoUrl` string, nullable, required — The video URL when the ad uses video media.
    - `externalId` string, nullable, required — External reference in the integrated system.
    - `rawContent` string, nullable, required — The raw content of the message as it was generated by the assistant.
    - `role` 'user' | 'assistant' | 'support' | 'system', required — The role of the actor that produced the message.
    - `senderId` string, uuid, nullable, required — The super identity ID of the sender (agents, squads, users or external users) of the message.

## Other responses

- `401` — Unauthorized.
- `404` — Chat not found.

---

[API](https://skmtc.dev/zaia/apis/public-api.md) · [All operations](https://skmtc.dev/zaia/apis/public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zaia/public-api/revisions/58da3b2ba49f/schema)
