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

# Send RCS message

> Send RCS to one or more numbers. Text, card, carousel, file, or template.



## OpenAPI

````yaml /en/rcs-api/api-reference/openapi-rcs.json post /v1/rcs/messages
openapi: 3.0.3
info:
  title: Notifique API RCS
  description: >-
    Send RCS messages and check status. Authenticate with `Authorization: Bearer
    sk_live_...` or `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Production
security:
  - ntfRcsBearerAuth: []
  - ntfRcsApiKeyHeader: []
tags:
  - name: RCS
    description: Envio e consulta de mensagens RCS
paths:
  /v1/rcs/messages:
    post:
      tags:
        - RCS
      summary: Send RCS message
      description: >-
        Send RCS to one or more numbers. Text, card, carousel, file, or
        template.
      operationId: ntfRcs_postV1RcsSend
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          description: Chave única para evitar envio duplicado.
          schema:
            type: string
        - name: x-idempotency-key
          in: header
          required: false
          description: Chave de idempotência (alternativa).
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NtfRcs_SendRcsRequest'
            example:
              to:
                - '5511999999999'
                - '5521988887777'
              type: basic
              payload:
                message: Olá! RCS de teste.
              schedule:
                sendAt: '2025-12-31T14:00:00.000Z'
              options:
                priority: high
                webhook:
                  url: https://api.seudominio.com/hooks/rcs-events
              metadata:
                ticket: abc
      responses:
        '202':
          description: RCS aceito(s). Enfileirado(s) para envio imediato ou agendado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_SendRcsResponse'
        '400':
          description: >-
            Validação: to vazio, messageType inválido, payload inválido para o
            tipo, ou agendamento além do permitido.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
              example:
                success: false
                error: Bad Request
                message: payload.message is required for BASIC
                details:
                  - field: payload
                    message: payload.message is required for BASIC
                code: BAD_REQUEST
        '401':
          description: Missing or invalid API Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
        '402':
          description: >-
            Trial/plano expirado, créditos/saldo insuficientes ou limite de
            gasto da API Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
              example:
                success: false
                error: Payment Required
                message: Trial ended or plan expired. Choose a plan to continue.
                code: WORKSPACE_BLOCKED
        '403':
          description: >-
            Escopo rcs:send ausente, créditos insuficientes (cada RCS consome 60
            créditos; PLAN_LIMIT_CREDITS) ou agendamento não permitido
            (PLAN_LIMIT_SCHEDULING).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
        '429':
          description: Rate limit excedido.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
components:
  schemas:
    NtfRcs_SendRcsRequest:
      type: object
      required:
        - to
        - payload
      properties:
        to:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 100
          description: >-
            Lista de números no formato E.164 (ex.: 5511999999999). Uma mensagem
            RCS por número; cada uma consome 60 créditos.
        type:
          type: string
          enum:
            - basic
            - card
            - carousel
            - file
            - template
          description: >-
            Message type (canonical, lowercase): basic (text), card, carousel,
            file, or template (workspace). Use messageType in UPPERCASE as a
            compatibility alias.
        messageType:
          type: string
          enum:
            - BASIC
            - CARD
            - CAROUSEL
            - FILE
          description: >-
            Alias de compatibilidade para `type`. Prefer `type` em minúsculo
            para novos integradores.
        payload:
          type: object
          description: >-
            Conteúdo conforme messageType. BASIC: { message }. CARD: { message,
            cardImage, cardTitle, cardMessage, buttons? }. CAROUSEL: { message,
            cards } (cada card: cardImage, cardTitle, cardMessage, buttons?).
            FILE: { message, file, fileName } (file = URL pública).
        schedule:
          type: object
          properties:
            sendAt:
              type: string
              format: date-time
              description: Data/hora em ISO 8601 para agendar o envio. Depende do plano.
        refer:
          type: string
          description: 'Referência opcional para correlação (ex.: ID do pedido).'
        options:
          type: object
          properties:
            priority:
              type: string
              enum:
                - high
                - normal
                - low
              default: normal
              description: >-
                `high` = fila Redis prioritária de RCS e fila prioritária de
                webhooks.
            webhook:
              type: object
              description: 'Webhook só para este envio: eventos `rcs.*` deste lote.'
              required:
                - url
              properties:
                url:
                  type: string
                  format: uri
                  maxLength: 2048
                secret:
                  type: string
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Metadados em `RcsLog.metadata` (string→string).
    NtfRcs_SendRcsResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          required:
            - status
            - count
            - messageIds
          properties:
            status:
              type: string
              enum:
                - QUEUED
                - SCHEDULED
              description: QUEUED = envio imediato; SCHEDULED = agendado.
            count:
              type: integer
              description: Quantidade de mensagens RCS criadas.
            messageIds:
              type: array
              items:
                type: string
              description: IDs canônicos (cuid) para consulta ou cancelamento do envio.
            rcsIds:
              type: array
              items:
                type: string
              description: Alias de compatibilidade para messageIds. Mesmo valor.
            scheduledAt:
              type: string
              format: date-time
              description: >-
                Presente quando status é SCHEDULED; data/hora do agendamento em
                ISO 8601.
    NtfRcs_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:
    ntfRcsBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API Key no header Authorization. Exemplo: `Authorization: Bearer
        sk_live_xxxxx`
    ntfRcsApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: 'API Key no header x-api-key. Exemplo: `x-api-key: sk_live_xxxxx`'

````