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

# Enviar RCS

> Envia uma ou mais mensagens RCS. Escolha o exemplo: **texto**, **cartão**, **carrossel (3 cards)**, **arquivo**, **template** ou **agendado**. Para agente branded, informe `from`. Permisos: [Ámbitos de la API Key](/es/rcs-api/como-funciona/escopos-da-api-key). La respuesta **202** solo trae `messageIds` y estado. Para ver el contenido enviado, use `GET /v1/rcs/messages/{id}` o el listado.



## OpenAPI

````yaml /es/rcs-api/api-reference/openapi-rcs.json post /v1/rcs/messages
openapi: 3.0.3
info:
  title: API RCS de Notifique
  description: >-
    Envíe mensajes RCS, gestione agentes (instancias) y consulte respuestas
    recibidas. Autentique com `Authorization: Bearer sk_live_...` ou
    `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Producción
security:
  - ntfRcsBearerAuth: []
  - ntfRcsApiKeyHeader: []
tags:
  - name: Mensagens
    description: Envío, listado, consulta y cancelación de mensajes RCS salientes.
  - name: Instâncias
    description: >-
      Agentes RCS de marca del workspace: creación, revisión y
      aprovisionamiento.
  - name: Inbound
    description: Mensajes RCS recibidos (MO) en el workspace.
paths:
  /v1/rcs/messages:
    post:
      tags:
        - Mensagens
      summary: Enviar RCS
      description: >-
        Envia uma ou mais mensagens RCS. Escolha o exemplo: **texto**,
        **cartão**, **carrossel (3 cards)**, **arquivo**, **template** ou
        **agendado**. Para agente branded, informe `from`. Permisos: [Ámbitos de
        la API Key](/es/rcs-api/como-funciona/escopos-da-api-key). La respuesta
        **202** solo trae `messageIds` y estado. Para ver el contenido enviado,
        use `GET /v1/rcs/messages/{id}` o el listado.
      operationId: ntfRcs_postV1RcsSend
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
          description: Chave única para evitar envio duplicado.
        - name: x-idempotency-key
          in: header
          required: false
          schema:
            type: string
          description: Alternativa ao Idempotency-Key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NtfRcs_SendRcsRequest'
            examples:
              basic:
                summary: Texto (BASIC)
                value:
                  to:
                    - '5511999999999'
                  type: basic
                  payload:
                    message: Olá! RCS de teste com texto simples.
              card:
                summary: Tarjeta (CARD)
                description: >-
                  Um card com imagem, título, descrição e botões. O campo
                  `message` não é exibido — use `cardMessage`.
                value:
                  to:
                    - '5511999999999'
                  type: card
                  payload:
                    cardImage: https://cdn.example.com/rcs/oferta.jpg
                    cardTitle: Oferta especial
                    cardMessage: Válida até domingo. Aproveite!
                    buttons:
                      - text: Ver oferta
                        url: https://example.com/promo
                      - text: Não tenho interesse
              carousel:
                summary: Carrusel (3 tarjetas)
                description: Vários cards na mesma mensagem. Cada card aceita até 4 botões.
                value:
                  to:
                    - '5511999999999'
                  type: carousel
                  payload:
                    cards:
                      - cardImage: https://cdn.example.com/rcs/card-1.jpg
                        cardTitle: Opção 1
                        cardMessage: Descrição do primeiro card.
                        buttons:
                          - text: Escolher 1
                      - cardImage: https://cdn.example.com/rcs/card-2.jpg
                        cardTitle: Opção 2
                        cardMessage: Descrição do segundo card.
                        buttons:
                          - text: Escolher 2
                      - cardImage: https://cdn.example.com/rcs/card-3.jpg
                        cardTitle: Opção 3
                        cardMessage: Descrição do terceiro card.
                        buttons:
                          - text: Escolher 3
                            url: https://example.com/opcao-3
              file:
                summary: Archivo (FILE)
                value:
                  to:
                    - '5511999999999'
                  type: file
                  payload:
                    message: Segue o documento em anexo.
                    file: https://cdn.example.com/rcs/contrato.pdf
                    fileName: contrato.pdf
              template:
                summary: Plantilla del workspace
                value:
                  to:
                    - '5511999999999'
                  type: template
                  payload:
                    templateId: clxx_template...
                    variables:
                      nome: Maria
                      codigo: '482910'
              scheduled:
                summary: Programado
                value:
                  to:
                    - '5511999999999'
                  type: basic
                  payload:
                    message: Lembrete agendado.
                  schedule:
                    sendAt: '2026-12-31T14:00:00.000Z'
              withInstance:
                summary: Con agente de marca
                description: >-
                  Envia pelo agente RCS da instância informada. A instância
                  precisa estar ACTIVE.
                value:
                  to:
                    - '5511999999999'
                  type: card
                  payload:
                    cardImage: https://cdn.example.com/rcs/oferta.jpg
                    cardTitle: Oferta da marca
                    cardMessage: Exclusivo para você.
                    buttons:
                      - text: Comprar
                        url: https://example.com/comprar
                  from: inst_rcs_abc123
      responses:
        '202':
          description: RCS aceito(s). En cola(s) para envio imediato ou agendado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_SendRcsResponse'
              examples:
                queued:
                  summary: En cola
                  value:
                    success: true
                    data:
                      status: QUEUED
                      count: 2
                      messageIds:
                        - clrcs1...
                        - clrcs2...
                scheduled:
                  summary: Programado
                  value:
                    success: true
                    data:
                      status: SCHEDULED
                      count: 1
                      messageIds:
                        - clrcs1...
                      scheduledAt: '2026-12-31T14:00:00.000Z'
        '400':
          description: >-
            Validação: `to` vazio, `type` inválido, payload inválido,
            `PAYLOAD_TOO_LARGE` 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
                code: BAD_REQUEST
                details:
                  - field: payload
                    message: payload.message is required for BASIC
        '401':
          description: API Key ausente ou inválida.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
              example:
                success: false
                error: Unauthorized
                message: Invalid or missing API Key
                code: UNAUTHORIZED
        '402':
          description: >-
            Trial/plano expirado, créditos insuficientes ou limite de gasto da
            API Key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
              example:
                success: false
                error: Payment Required
                message: Insufficient credits to send messages.
                code: INSUFFICIENT_CREDITS
        '403':
          description: >-
            Escopo `rcs:send` ausente, instância não permitida pela API Key ou
            agendamento bloqueado (`PLAN_LIMIT_SCHEDULING`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
              example:
                success: false
                error: Forbidden
                message: 'Missing scope: rcs:send'
                code: FORBIDDEN
        '404':
          description: Instância RCS não encontrada (`RCS_INSTANCE_NOT_FOUND`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
              example:
                success: false
                error: Not Found
                message: RCS instance not found
                code: RCS_INSTANCE_NOT_FOUND
        '429':
          description: Rate limit ou limite diário do sandbox.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
              example:
                success: false
                error: Too Many Requests
                message: Workspace backlog limit exceeded.
                code: WORKSPACE_BACKLOG_LIMIT
        '503':
          description: >-
            RCS não configurado, instância inativa (`RCS_INSTANCE_NOT_ACTIVE`)
            ou falha ao enfileirar.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
              example:
                success: false
                error: Service Unavailable
                message: RCS instance is not active
                code: RCS_INSTANCE_NOT_ACTIVE
components:
  schemas:
    NtfRcs_SendRcsRequest:
      type: object
      required:
        - from
        - to
        - payload
        - type
      properties:
        to:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 500
          description: >-
            Números E.164 sem `+`. Uma mensagem por número. BASIC **140**
            créditos; CARD/CAROUSEL/FILE **200** créditos.
        payload:
          type: object
          description: >-
            Conteúdo conforme `type`. basic: { message }. card: { message,
            cardImage, cardTitle, cardMessage, buttons? }. carousel: { message,
            cards }. file: { message, file, fileName }.
          properties:
            message:
              type: string
              description: Texto principal (todos os tipos).
            templateId:
              type: string
              description: 'Com `type: template`.'
            variables:
              type: object
              additionalProperties: true
              properties:
                nome:
                  type: string
                  example: Maria
                codigo:
                  type: string
                  example: '482910'
            cardImage:
              type: string
              description: 'URL da imagem (`type: card`).'
            cardTitle:
              type: string
            cardMessage:
              type: string
            buttons:
              type: array
              items:
                type: object
                additionalProperties: true
            cards:
              type: array
              items:
                type: object
                additionalProperties: true
            file:
              type: string
              description: 'URL do arquivo (`type: file`).'
            fileName:
              type: string
        schedule:
          type: object
          properties:
            sendAt:
              type: string
              format: date-time
        refer:
          type: string
          maxLength: 255
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Metadados string→string (máx. 20 chaves).
        options:
          type: object
          properties:
            priority:
              type: string
              enum:
                - high
                - normal
                - low
            webhook:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                secret:
                  type: string
        localization:
          type: object
          properties:
            mode:
              type: string
            sourceLocale:
              type: string
        i18n:
          type: object
          additionalProperties: true
        from:
          type: string
          description: >-
            Agente RCS: id ou nome (opcional se o workspace usa remetente
            compartilhado).
      example:
        to:
          - '5511999999999'
        payload:
          message: string
          templateId: clxx...
          variables: {}
          cardImage: string
          cardTitle: string
          cardMessage: string
          buttons:
            - {}
          cards:
            - {}
          file: string
          fileName: string
        type: basic
        schedule:
          sendAt: '2025-02-10T14:00:00.000Z'
        refer: string
        metadata: {}
        options:
          priority: high
          webhook:
            url: https://example.com/resource
            secret: string
        localization:
          mode: string
          sourceLocale: string
        i18n: {}
        from: clxx...
      description: >-
        Envio canônico: `to` (E.164) e conteúdo em `payload`. `type`: basic,
        card, carousel, file ou template.
    NtfRcs_SendRcsResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
        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/envios criados nesta requisição.
            messageIds:
              type: array
              items:
                type: string
              description: IDs dos registros criados (consulta, cancelamento, webhooks).
            scheduledAt:
              type: string
              format: date-time
              description: Presente quando `status` é `SCHEDULED`.
            localization:
              type: object
              description: Metadados quando localização IA/manual foi aplicada.
              properties:
                appliedAiLocales:
                  type: array
                  items:
                    type: string
                fallbackLocales:
                  type: array
                  items:
                    type: string
                aiTranslatedRecipientCount:
                  type: integer
            sandbox:
              type: boolean
              description: '`true` quando a requisição usou `sk_test_...`.'
      example:
        success: true
        data:
          status: QUEUED
          count: 1
          messageIds:
            - clxx...
          scheduledAt: '2025-02-10T14:00:00.000Z'
          localization:
            appliedAiLocales:
              - string
            fallbackLocales:
              - string
            aiTranslatedRecipientCount: 1
          sandbox: true
    NtfRcs_ErrorResponse:
      type: object
      required:
        - success
        - error
        - message
        - code
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
        message:
          type: string
        code:
          type: string
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
        data:
          type: object
          additionalProperties: true
          properties:
            status:
              type: string
              example: SENT
      example:
        success: false
        error: string
        message: string
        code: string
        details:
          - field: string
            message: string
        data: {}
  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`'

````