---
title: "Cancel a scheduled message"
method: POST
path: "/v1/messages/scheduled/{id}/cancel"
tags: ["Scheduled Messages"]
---

# Cancel a scheduled message

`POST /v1/messages/scheduled/{id}/cancel`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/messages/scheduled/{id}/cancel`
- Auth: API key in header `x-api-key`

Cancels a pending scheduled message so it will not be sent, and returns the updated scheduled message.

## Path parameters

- `id` string, required

## Response `200`

Success

- object
  - `success` boolean, required
  - `item` ScheduledMessage, required
    - `id` string, required
    - `status` 'pending' | 'dispatching' | 'paused' | 'dispatched' | 'cancelled' | 'failed', required
    - `scheduledFor` string, required
    - `timezone` string, required
    - `send` SendMessagePayload, required
      - `conversationId` string
      - `metadata` MessageMetadata, nullable
      - `channel` 'email', required
      - `to` EmailRecipient[], required
        - union
          - object
            - `contactId` string, required
          - object
            - `email` string, required
            - `name` string, nullable
            - `displayName` string, nullable
      - `cc` EmailRecipient[], nullable
        - union
          - object
            - `contactId` string, required
          - object
            - `email` string, required
            - `name` string, nullable
            - `displayName` string, nullable
      - `bcc` EmailRecipient[], nullable
        - union
          - object
            - `contactId` string, required
          - object
            - `email` string, required
            - `name` string, nullable
            - `displayName` string, nullable
      - `from` EmailSender, nullable
        - `email` string, required
        - `name` string, nullable
      - `email` EmailContent, required
        - `subject` string, nullable
        - `html` string, nullable
        - `text` string, nullable
        - `attachments` EmailAttachment[], nullable
          - `filename` string, required
          - `content` string, nullable
          - `mediaId` string
          - `contentType` string, required
          - `size` integer, required
        - `publicationId` string
        - `inputContractId` string
        - `templateId` string
        - `templateSlug` string, nullable
        - `templateData` TemplateData
        - `locale` string
        - `timeZone` string
        - `inReplyToMessageId` string
        - `replyTo` string[], nullable
        - `unsubscribeGroupId` string
        - `tracking` EmailTrackingOverrideV1: Requested per-send engagement tracking policy. Recipient opt-out takes precedence, then explicit fields, organization defaults, and product defaults.
          - `opens` boolean: Override open tracking for this send. Omit to inherit the organization default. A recipient tracking opt-out always disables tracking.
          - `clicks` boolean: Override click tracking for this send. Omit to inherit the organization default. A recipient tracking opt-out always disables tracking.
        - `footer` EmailFooterOverride
          - `enabled` boolean, nullable
    - `messageId` string, required
    - `idempotencyKey` string, nullable, required
    - `referenceId` string, nullable, required
    - `failureReason` string, nullable, required
    - `attempts` number, required
    - `createdBy` string, nullable, required
    - `actorEmail` string, required
    - `memberRole` string, required
    - `createdAt` string, required
    - `updatedAt` string, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `409`: ConflictError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

[API](https://skmtc.dev/samva/apis/samva-api.md) · [All operations](https://skmtc.dev/samva/apis/samva-api/llms.txt) · [OpenAPI document](https://skmtc.dev/samva/apis/samva-api/revisions/a99408542cc3?raw)
