> ## 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.

# List SMS messages

> Shows SMS you have sent. Filter by date or status and browse page by page.



## OpenAPI

````yaml /en/sms-api/api-reference/openapi-sms.json get /v1/sms/messages
openapi: 3.0.3
info:
  title: Notifique API. SMS
  description: >-
    Send SMS, check delivery status, and view inbound messages. Authenticate
    with `Authorization: Bearer sk_live_...` or `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Production
security:
  - ntfSmsBearerAuth: []
  - ntfSmsApiKeyHeader: []
tags:
  - name: SMS
    description: Send SMS, check status, and view received messages.
paths:
  /v1/sms/messages:
    get:
      tags:
        - SMS
      summary: List SMS messages
      description: >-
        Shows SMS you have sent. Filter by date or status and browse page by
        page.
      operationId: ntfSms_getV1SmsMessages
      parameters:
        - name: page
          in: query
          schema:
            type: string
          description: Page (default 1).
        - name: limit
          in: query
          schema:
            type: string
          description: Items per page (default 20, max 100).
        - name: fromDate
          in: query
          schema:
            type: string
            format: date-time
          description: Start of date range (filters createdAt, inclusive).
        - name: toDate
          in: query
          schema:
            type: string
            format: date-time
          description: End of date range (filters createdAt, inclusive).
        - name: status
          in: query
          schema:
            type: string
          description: >-
            One or more comma-separated statuses: QUEUED, SCHEDULED, SENT,
            PROCESSING, DELIVERED, FAILED, CANCELLED. Invalid values are
            ignored.
      responses:
        '200':
          description: SMS list with pagination.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - data
                  - pagination
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    description: >-
                      Cada item tem os mesmos campos que GET
                      /v1/sms/messages/{id} em `data` (sem campos extras).
                    items:
                      $ref: '#/components/schemas/NtfSms_SmsListItem'
                  pagination:
                    type: object
                    required:
                      - total
                      - page
                      - limit
                      - totalPages
                    properties:
                      total:
                        type: integer
                        description: Total de SMS que batem com os filtros.
                      page:
                        type: integer
                      limit:
                        type: integer
                      totalPages:
                        type: integer
              example:
                success: true
                data:
                  - smsId: clxx123...
                    to: '5511999999999'
                    message: Olá!
                    status: DELIVERED
                    sentAt: '2025-02-16T12:00:00.000Z'
                    deliveredAt: '2025-02-16T12:00:05.000Z'
                    failedAt: null
                    scheduledFor: null
                    errorMessage: null
                    createdAt: '2025-02-16T11:59:58.000Z'
                pagination:
                  total: 42
                  page: 1
                  limit: 20
                  totalPages: 3
        '401':
          description: Missing or invalid API Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfSms_ErrorResponse'
        '403':
          description: Missing sms:read scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfSms_ErrorResponse'
components:
  schemas:
    NtfSms_SmsListItem:
      type: object
      description: >-
        Resposta de um SMS na listagem ou em GET por ID: a API sempre devolve
        todos estes campos; datas ausentes vêm como `null`. Não inclui
        `provider`, `externalId` nem `rawResponse`.
      required:
        - smsId
        - to
        - message
        - status
        - sentAt
        - deliveredAt
        - failedAt
        - scheduledFor
        - errorMessage
        - createdAt
      properties:
        smsId:
          type: string
          description: ID (cuid) do SMS.
        to:
          type: string
          description: Destinatário E.164.
        message:
          type: string
          description: Texto enviado (9 a 160 caracteres no envio).
        status:
          type: string
          enum:
            - SCHEDULED
            - QUEUED
            - SENT
            - PROCESSING
            - DELIVERED
            - FAILED
            - CANCELLED
          description: >-
            Mesmos valores do banco; ver descrição em POST / envio para
            significado operacional.
        sentAt:
          type: string
          format: date-time
          nullable: true
        deliveredAt:
          type: string
          format: date-time
          nullable: true
        failedAt:
          type: string
          format: date-time
          nullable: true
        scheduledFor:
          type: string
          format: date-time
          nullable: true
        errorMessage:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
    NtfSms_ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: HTTP-style error label (e.g. Unauthorized, Bad Request, Not Found).
        message:
          type: string
          description: >-
            Human-readable message for end users (localized via Accept-Language
            / x-locale when applicable).
        code:
          type: string
          description: >-
            Stable API v1 code (enum). Always present on errors. Use with the
            HTTP status to decide retry or fix. See [Error
            responses](/en/guides/conceitos/resposta-de-erros).
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
          description: Lista de erros de validação por campo.
      required:
        - success
        - error
        - message
        - code
  securitySchemes:
    ntfSmsBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API Key no header Authorization. Exemplo: `Authorization: Bearer
        sk_live_xxxxx`
    ntfSmsApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key no header x-api-key. Exemplo: `x-api-key: sk_live_xxxxx`'

````