---
title: "Listar mensagens do chat"
method: GET
path: "/chats/{id}/messages"
tags: ["Chats"]
---

# Listar mensagens do chat

`GET /chats/{id}/messages`

Lista o conteúdo/mensagens de um determinado chat, em ordem cronológica.
- Cada mensagem traz o texto, autor (cliente/atendente/sistema/IA), direção, tipo, mídia/anexo (quando houver), mensagem citada e status de entrega.

## Path parameters

- `id` integer, required

## Query parameters

- `offset` integer
- `limit` integer

## Response `200`

- object[]
  - `id` string, required — Identificador da mensagem
  - `text` string, nullable, required — Conteúdo textual da mensagem. Nulo quando a mensagem é um anexo (nesse caso o conteúdo fica em `media`)
  - `direction` 'inbound' | 'outbound', required — Direção da mensagem. * `inbound`: enviada pelo cliente * `outbound`: enviada pela empresa (atendente, sistema ou IA)
  - `type` string, required — Tipo da mensagem (ex.: `text`, `attachment`, `file`, `event`, `comment`, `notice`, `interactive`, `list`, `mail`)
  - `author` object, required — Objeto com informações sobre o autor da mensagem
    - `type` 'client' | 'attendant' | 'system' | 'ai', required — Papel do autor. * `client`: cliente * `attendant`: atendente humano * `system`: mensagem de evento/sistema * `ai`: agente de IA ou chatbot
    - `id` integer, nullable, required — ID do usuário atendente autor da mensagem, quando aplicável
    - `name` string, nullable, required — Nome de exibição do autor, quando disponível
  - `media` object, nullable, required — Presente quando a mensagem é um anexo/mídia; nulo caso contrário
    - `content_type` string, nullable, required — Tipo MIME do arquivo
    - `url` string, nullable, required — URL do arquivo
    - `caption` string, nullable, required — Legenda ou nome do arquivo
    - `is_voice` boolean, required — Indica se o anexo é uma mensagem de voz (áudio push-to-talk)
  - `quoted_message` object, nullable, required — Mensagem à qual esta responde, quando houver
    - `id` string, nullable, required — Identificador da mensagem citada
    - `text` string, nullable, required — Texto da mensagem citada
    - `author_name` string, nullable, required — Nome do autor da mensagem citada
    - `type` string, nullable, required — Tipo da mensagem citada
  - `status` object, required — Situação de entrega da mensagem
    - `sent` boolean, required — A mensagem foi enviada?
    - `delivered` boolean, required — A mensagem foi entregue?
    - `read` boolean, required — A mensagem foi lida?
    - `failed` boolean, required — A mensagem falhou no envio?
  - `created_at` string, nullable, required — Data e hora da mensagem (ISO8601)

## Other responses

- `403` — ### **Problemas com permissão** Essa resposta significa que o seu grupo de permissões não possui a permissão necessária para acessar essa rota
- `404` — ### **Chat não encontrado**
- `422` — ### **Problemas com os parâmetros informados**

---

[API](https://skmtc.net/tiflux/apis/tiflux-official-api.md) · [All operations](https://skmtc.net/tiflux/apis/tiflux-official-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tiflux/tiflux-official-api/revisions/c656412a58bc/schema)
