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

# Cancelar RCS agendado

> Cancela algo que ainda não saiu — estava na fila ou agendado.



## OpenAPI

````yaml /rcs-api/api-reference/openapi-rcs.json post /v1/rcs/messages/{id}/cancel
openapi: 3.0.3
info:
  title: Notifique API RCS
  description: >-
    Envie mensagens RCS e consulte status. Autentique com `Authorization: Bearer
    sk_live_...` ou `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Produção
security:
  - ntfRcsBearerAuth: []
  - ntfRcsApiKeyHeader: []
tags:
  - name: RCS
    description: Envio e consulta de mensagens RCS
paths:
  /v1/rcs/messages/{id}/cancel:
    post:
      tags:
        - RCS
      summary: Cancelar RCS agendado
      description: Cancela algo que ainda não saiu — estava na fila ou agendado.
      operationId: ntfRcs_postV1RcsCancel
      parameters:
        - name: id
          in: path
          required: true
          description: ID (cuid) do RCS retornado no envio.
          schema:
            type: string
      responses:
        '200':
          description: RCS cancelado com sucesso.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_CancelRcsResponse'
              example:
                success: true
                data:
                  rcsId: clxx123...
                  status: CANCELLED
        '400':
          description: RCS não está QUEUED nem SCHEDULED.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
              example:
                success: false
                error: Bad Request
                message: Only queued or scheduled RCS can be cancelled.
                data:
                  status: SENT
                code: BAD_REQUEST
        '401':
          description: API Key ausente ou inválida.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
        '403':
          description: Escopo rcs:cancel ausente.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
        '404':
          description: RCS não encontrado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfRcs_ErrorResponse'
              example:
                success: false
                error: Not Found
                message: RCS message not found
                code: NOT_FOUND
components:
  schemas:
    NtfRcs_CancelRcsResponse:
      type: object
      required:
        - success
        - data
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            rcsId:
              type: string
            status:
              type: string
              enum:
                - CANCELLED
    NtfRcs_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
          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`'

````