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

# Cancel a scheduled message



## OpenAPI

````yaml openapi1 POST /schedule/{sourceTrackingId}/cancel
openapi: 3.0.0
info:
  title: Paubox Email API
  description: >
    Public documentation for Paubox's Transactional Email API


    ## Authentication


    **IMPORTANT**: This API uses a custom authentication format that requires
    the "Token token=" prefix.


    All requests must include the Authorization header in this exact format:

    ```

    Authorization: Token token=YOUR_API_KEY

    ```


    **Note for Code Generation Tools**: Auto-generated code from this
    specification may need to be modified to include the "Token token=" prefix,
    as most generators expect standard Bearer token format.
  version: 1.0.0
servers:
  - url: https://api.paubox.com/v1/email
    description: Paubox Email API
security:
  - PauboxToken: []
tags:
  - name: Messages
    description: Send individual or bulk transactional email
  - name: Scheduled Send
    description: Schedule, check, reschedule, and cancel future email delivery
  - name: Dynamic Templates
    description: Manage and use dynamic Handlebars templates for email content
paths:
  /schedule/{sourceTrackingId}/cancel:
    post:
      tags:
        - Scheduled Send
      summary: Cancel a pending scheduled message
      operationId: cancelScheduledMessage
      parameters:
        - name: sourceTrackingId
          in: path
          required: true
          schema:
            type: string
          description: The sourceTrackingId of the scheduled message
      responses:
        '200':
          description: Message cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelScheduledResponse'
        '400':
          description: Not found or not in pending state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - PauboxToken: []
components:
  schemas:
    CancelScheduledResponse:
      type: object
      properties:
        sourceTrackingId:
          type: string
        state:
          type: string
          example: cancelled
        data:
          type: string
          example: Cancelled
    ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorResponse_errors'
    ErrorResponse_errors:
      type: object
      properties:
        code:
          type: integer
        title:
          type: string
        details:
          type: string
  securitySchemes:
    PauboxToken:
      type: http
      scheme: bearer
      description: >
        Paubox API uses Bearer token authentication in the Authorization header.


        Format: `Authorization: Bearer YOUR_API_KEY_HERE`


        Example: `Authorization: Bearer
        9e5b092b632445b8f570c62ae54f30fda1044305`


        The legacy format `Authorization: Token token=YOUR_API_KEY_HERE` is also
        supported.

````