> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notifique.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Listar mensagens Telegram

> Mostra o histórico de Telegram enviados. Dá para filtrar por data e status.



## OpenAPI

````yaml /telegram-api/api-reference/openapi-telegram.json get /v1/telegram/messages
openapi: 3.0.3
info:
  title: Notifique API — Telegram
  description: >-
    Envie mensagens Telegram e gerencie conexões. Autentique com `Authorization:
    Bearer sk_live_...` ou `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Produção
security:
  - ntfTgBearerAuth: []
  - ntfTgApiKeyHeader: []
tags:
  - name: Mensagens
    description: Enviar e gerenciar mensagens
  - name: Instâncias
    description: Criar e conectar bots ou contas USER
  - name: Chats
    description: Listar chats
paths:
  /v1/telegram/messages:
    get:
      tags:
        - Mensagens
      summary: Listar mensagens Telegram
      description: >-
        Mostra o histórico de Telegram enviados. Dá para filtrar por data e
        status.
      operationId: ntfTg_getV1TelegramMessages
      parameters:
        - name: page
          in: query
          description: Página (padrão definido pelo servidor).
          schema:
            type: string
        - name: limit
          in: query
          description: Itens por página.
          schema:
            type: string
        - name: fromDate
          in: query
          description: Início do intervalo (`createdAt`), ISO 8601.
          schema:
            type: string
        - name: toDate
          in: query
          description: Fim do intervalo (`createdAt`), ISO 8601.
          schema:
            type: string
        - name: instanceIds
          in: query
          description: Filtrar por instância(s); use vírgula para vários IDs.
          schema:
            type: string
        - name: status
          in: query
          description: Filtrar por status (vários separados por vírgula).
          schema:
            type: string
        - name: type
          in: query
          description: Filtrar por tipo de mensagem.
          schema:
            type: string
        - name: includeEvents
          in: query
          description: Se `true`, inclui a linha do tempo de eventos por mensagem.
          schema:
            type: string
      responses:
        '200':
          description: >-
            Lista em `data` e totais em `pagination` (`total`, `page`, `limit`,
            `totalPages`). Cada item traz `id`, `instanceId`, `to`, `type`,
            `payload`, `status`, datas (`scheduledAt`, `sentAt`, etc.) e, se
            pedido, `events`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfTg_MessageListEnvelope'
              example:
                success: true
                data:
                  - id: clxx_message_1
                    instanceId: clxx_inst_1
                    to: '123456789'
                    toName: null
                    type: TEXT
                    payload:
                      message: Olá!
                    status: SENT
                    externalId: '98765'
                    telegramPeer: '123456789'
                    metadata: null
                    scheduledAt: null
                    sentAt: '2026-04-12T14:00:00.000Z'
                    deliveredAt: null
                    readAt: null
                    failedAt: null
                    errorMessage: null
                    createdAt: '2026-04-12T13:59:50.000Z'
                    updatedAt: '2026-04-12T14:00:01.000Z'
                pagination:
                  total: 42
                  page: 1
                  limit: 20
                  totalPages: 3
        '401':
          description: Chave ausente ou inválida.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfTg_ErrorResponse'
              example:
                success: false
                error: Unauthorized
                message: Invalid or missing API Key
                code: UNAUTHORIZED
        '402':
          description: Workspace suspenso ou plano expirado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfTg_ErrorResponse'
              example:
                success: false
                error: Payment Required
                message: Plan expired or suspended
                code: WORKSPACE_BLOCKED
        '403':
          description: >-
            Sem escopo **telegram:read** ou instância não permitida para esta
            chave.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfTg_ErrorResponse'
              examples:
                scope:
                  summary: Escopo
                  value:
                    success: false
                    error: Forbidden
                    message: 'Missing scope: telegram:read'
                    code: FORBIDDEN
                instance:
                  summary: Restrição por instância
                  value:
                    success: false
                    error: Forbidden
                    message: >-
                      Access denied to instance(s): clxx.... Check API key
                      instance restrictions.
                    code: FORBIDDEN
components:
  schemas:
    NtfTg_MessageListEnvelope:
      type: object
      required:
        - success
        - data
        - pagination
      properties:
        success:
          type: boolean
          example: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/NtfTg_MessageOutboundRow'
        pagination:
          $ref: '#/components/schemas/NtfTg_Pagination'
    NtfTg_ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: 'Rótulo HTTP do erro (ex.: Unauthorized, Bad Request, Not Found).'
        message:
          type: string
          description: >-
            Mensagem legível para exibir ao usuário (localizada via
            Accept-Language / x-locale quando aplicável).
        code:
          type: string
          description: >-
            Código estável da API v1 (enum). Sempre presente em erros. Use com o
            status HTTP para decidir retry ou correção. Ver [Respostas de
            erro](/guides/conceitos/resposta-de-erros).
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
      required:
        - success
        - error
        - message
        - code
    NtfTg_MessageOutboundRow:
      type: object
      description: 'Item da listagem de mensagens enviadas (campo interno: `id`).'
      properties:
        id:
          type: string
        instanceId:
          type: string
        to:
          type: string
        toName:
          type: string
          nullable: true
        type:
          type: string
        payload:
          type: object
        status:
          type: string
        externalId:
          type: string
          nullable: true
        telegramPeer:
          type: string
          nullable: true
        metadata:
          nullable: true
        scheduledAt:
          type: string
          format: date-time
          nullable: true
        sentAt:
          type: string
          format: date-time
          nullable: true
        deliveredAt:
          type: string
          format: date-time
          nullable: true
        readAt:
          type: string
          format: date-time
          nullable: true
        failedAt:
          type: string
          format: date-time
          nullable: true
        errorMessage:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        events:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              event:
                type: string
              data: {}
              timestamp:
                type: string
                format: date-time
    NtfTg_Pagination:
      type: object
      properties:
        total:
          type: integer
        page:
          type: integer
        limit:
          type: integer
        totalPages:
          type: integer
  securitySchemes:
    ntfTgBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Authorization: Bearer sk_live_xxxxx'
    ntfTgApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````