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

# Cancel a scheduled email

> Cancels a scheduled message before its time: it becomes `canceled`, its recipients too, and its price is refunded (a free e-mail goes back to this month's allowance). Only while it is `scheduled`: once it is on its way the answer is `409 message_not_scheduled`. Answers the message in the extended shape. No webhook announces a cancel.

Guide: [Scheduling](https://docs.tawked.com/email/scheduling.md)


## OpenAPI

````yaml https://tawked.com/openapi.json post /v1/email/messages/{id}/cancel
openapi: 3.1.0
info:
  title: Tawked API
  version: 2026-09
  summary: >-
    Tawked Verify: OTP verification for Saudi mobile numbers over SMS, in two
    calls. Tawked Notifications: WhatsApp template messages from the
    application's own number. Tawked Email: transactional e-mail from the
    application's own verified domain. Tawked Chat: the conversation menus a
    connected app adds beside the conversations of its connection's application,
    and the auto-attendant it sets up there. The Partner API for platforms that
    run Tawked Verify for their merchants.
  description: >-
    The public API of Tawked, a Saudi messaging platform: Tawked Verify
    (one-time codes), Tawked Notifications (WhatsApp templates from the
    application's own number), Tawked Email (transactional e-mail from the
    application's own domain) and the Partner API. Tawked Verify is an OTP
    verification API for Saudi numbers. One call sends a one-time code by SMS to
    a Saudi mobile number, and a second call checks it. SAR 0.09 per SMS code
    sent, prepaid; a send the network refuses is refunded. Authenticate with a
    Bearer API key from the dashboard (tk_live_ for production, tk_test_ for the
    sandbox, tk_partner_ for partners, tk_partner_test_ for the partner
    sandbox). Partners (tk_partner_) provision a Verify application per merchant
    under /v1/partner/applications and name it as application on every Verify
    call. Both /v1/... and /api/v1/... answer identically. Rate limit: 120
    requests per minute per key.
  termsOfService: https://tawked.com/en/terms
  license:
    name: Proprietary (Tawked terms of service)
    url: https://tawked.com/en/terms
  contact:
    name: Tawked support
    email: support@tawked.com
    url: https://tawked.com/en/contact
servers:
  - url: https://tawked.com
    description: Production (the sandbox is a tk_test_ key on the same host)
  - url: https://tawked.com/api
    description: The same API under /api/v1/..., kept for older integrations
security:
  - bearerKey: []
  - headerKey: []
tags:
  - name: Verify
    x-group: Verify
    description: Send and check one-time codes.
  - name: WhatsApp
    x-group: Notifications
    description: >-
      Tawked Notifications: send approved WhatsApp templates through the number
      connected to an application. An application in review or approved connects
      its own number from the dashboard.
  - name: Email
    x-group: Email
    description: >-
      Tawked Email: send transactional e-mail from an address on a verified
      domain of the application, to up to 50 recipients a message, in batches or
      scheduled, and read and list what was sent. Live keys only.
  - name: Chat
    x-group: Chat
    description: >-
      Tawked Chat: the conversation menus a connected app adds beside the
      conversations of its connection's application, and reads, changes and
      removes, with `chat:menus`; and the application's auto-attendant, which a
      connected app sets up, publishes and switches on or off, with
      `chat:attendant`. A connected app's key only; a business adds its own
      menus and builds its auto-attendant in the console.
  - name: Partner
    x-group: Partner API
    description: >-
      For platforms that run Tawked Verify for their merchants: provision a
      Verify application per merchant, keep its brand and verify settings
      current, switch it off and on, and read usage and the code log. Partner
      keys (tk_partner_) only; every Verify operation then takes `application`
      with the partner's own id for the application.
  - name: Webhooks
    x-group: Webhooks
    description: >-
      The events Tawked sends to your endpoint: an application's verification
      outcomes and message statuses, and a partner account's lifecycle, balance
      and opt-in verification events. Every delivery is signed the same way and
      retried the same way.
externalDocs:
  description: Developer docs, with code samples
  url: https://docs.tawked.com
paths:
  /v1/email/messages/{id}/cancel:
    post:
      tags:
        - Email
      summary: Cancel a scheduled email
      description: >-
        Cancels a scheduled message before its time: it becomes `canceled`, its
        recipients too, and its price is refunded (a free e-mail goes back to
        this month's allowance). Only while it is `scheduled`: once it is on its
        way the answer is `409 message_not_scheduled`. Answers the message in
        the extended shape. No webhook announces a cancel.
      operationId: email_cancel
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                application:
                  type: string
                  description: >-
                    Partner keys only: the partner's own id (external_id) for
                    the application, in the body or the query string.
      responses:
        '200':
          description: Canceled
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  status:
                    type: string
                  from:
                    type: object
                    properties:
                      name:
                        type: string
                      address:
                        type: string
                  to:
                    type: array
                    items:
                      type: string
                  cc:
                    type: array
                    items:
                      type: string
                  bcc:
                    type: array
                    items:
                      type:
                        - string
                        - 'null'
                  reply_to:
                    type: array
                    items:
                      type: string
                  subject:
                    type: string
                  reference:
                    type: string
                  tags:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        value:
                          type: string
                  scheduled_at:
                    type: string
                    format: date-time
                  recipients:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        address:
                          type: string
                        name:
                          type: string
                        type:
                          type: string
                        status:
                          type: string
                        sent_at:
                          type:
                            - string
                            - 'null'
                        delivered_at:
                          type:
                            - string
                            - 'null'
                        bounced_at:
                          type:
                            - string
                            - 'null'
                        complained_at:
                          type:
                            - string
                            - 'null'
                        delayed_at:
                          type:
                            - string
                            - 'null'
                        failed_at:
                          type:
                            - string
                            - 'null'
                        bounce:
                          type:
                            - string
                            - 'null'
                        error:
                          type:
                            - string
                            - 'null'
                        opened_at:
                          type:
                            - string
                            - 'null'
                        clicked_at:
                          type:
                            - string
                            - 'null'
                        opens:
                          type: integer
                        clicks:
                          type: integer
                  price_halalas:
                    type: integer
                  cost:
                    type: object
                    properties:
                      emails:
                        type: integer
                      suppressed:
                        type: integer
                      free:
                        type: integer
                      billed:
                        type: integer
                      halalas:
                        type: string
                  attachments:
                    type: array
                    items:
                      type:
                        - string
                        - 'null'
                  header_names:
                    type: array
                    items:
                      type:
                        - string
                        - 'null'
                  error:
                    type:
                      - string
                      - 'null'
                  created_at:
                    type: string
                    format: date-time
                  sent_at:
                    type:
                      - string
                      - 'null'
                  delivered_at:
                    type:
                      - string
                      - 'null'
                  bounced_at:
                    type:
                      - string
                      - 'null'
                  complained_at:
                    type:
                      - string
                      - 'null'
                  failed_at:
                    type:
                      - string
                      - 'null'
                  canceled_at:
                    type: string
                    format: date-time
                  batch_id:
                    type:
                      - string
                      - 'null'
                  mode:
                    type: string
                  template:
                    type:
                      - string
                      - 'null'
                  tracking:
                    type:
                      - string
                      - 'null'
                  opened_at:
                    type:
                      - string
                      - 'null'
                  clicked_at:
                    type:
                      - string
                      - 'null'
                  opens:
                    type: integer
                  clicks:
                    type: integer
              examples:
                canceled:
                  summary: Canceled
                  value:
                    id: 0199f1c2-7a41-7c3e-9d2b-5e8f1a2b3c4d
                    status: canceled
                    from:
                      name: متجر أكمي
                      address: orders@acme.sa
                    to:
                      - sara@example.com
                    cc:
                      - accounts@acme.sa
                    bcc: []
                    reply_to:
                      - support@acme.sa
                    subject: طلبك رقم 1042 قيد التجهيز
                    reference: order-1042
                    tags:
                      - name: category
                        value: order
                    scheduled_at: '2026-10-22T09:00:00+03:00'
                    recipients:
                      - id: 0199f1c2-7a42-7b10-8c3d-1f2e3d4c5b6a
                        address: sara@example.com
                        name: Sara
                        type: to
                        status: canceled
                        sent_at: null
                        delivered_at: null
                        bounced_at: null
                        complained_at: null
                        delayed_at: null
                        failed_at: null
                        bounce: null
                        error: null
                        opened_at: null
                        clicked_at: null
                        opens: 0
                        clicks: 0
                      - id: 0199f1c2-7a42-7b10-8c3d-2a3b4c5d6e7f
                        address: accounts@acme.sa
                        name: null
                        type: cc
                        status: canceled
                        sent_at: null
                        delivered_at: null
                        bounced_at: null
                        complained_at: null
                        delayed_at: null
                        failed_at: null
                        bounce: null
                        error: null
                        opened_at: null
                        clicked_at: null
                        opens: 0
                        clicks: 0
                    price_halalas: 0
                    cost:
                      emails: 2
                      suppressed: 0
                      free: 2
                      billed: 0
                      halalas: '0'
                    attachments: []
                    header_names: []
                    error: null
                    created_at: '2026-10-21T12:00:00+03:00'
                    sent_at: null
                    delivered_at: null
                    bounced_at: null
                    complained_at: null
                    failed_at: null
                    canceled_at: '2026-10-21T15:20:00+03:00'
                    batch_id: null
                    mode: live
                    template: null
                    tracking: null
                    opened_at: null
                    clicked_at: null
                    opens: 0
                    clicks: 0
          headers:
            RateLimit-Limit:
              description: >-
                The account's requests a second on the e-mail routes, for all
                its applications, keys and the SMTP relay together: max(10, its
                daily limit / 1000).
              schema:
                type: string
                pattern: ^[0-9]+$
            RateLimit-Remaining:
              description: Requests left in this second.
              schema:
                type: string
                pattern: ^[0-9]+$
            RateLimit-Reset:
              description: Seconds until the next second opens (0 or 1).
              schema:
                type: string
                pattern: ^[0-9]+$
            Tawked-Daily-Remaining:
              description: E-mails (recipients) left today, a Riyadh day.
              schema:
                type: string
                pattern: ^[0-9]+$
        '400':
          description: >-
            `service_required`: Partner key used with no `application` (or
            `service`) in the request body.; `invalid_request`: start: `to` (and
            `phone`) both missing or blank. check: `id` or `code` missing.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        enum:
                          - service_required
                          - invalid_request
        '401':
          description: >-
            `unauthorized`: Missing, unknown, revoked, or mode-mismatched key;
            or an unknown/suspended partner.; `key_expired`: The key's
            `expires_at` has passed. Checked right after the key is recognised,
            before the IP allowlist or scope.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        enum:
                          - unauthorized
                          - key_expired
        '403':
          description: >-
            `live_key_required`: A test (tk_test_) key on a management endpoint:
            domains, suppressions, metrics and templates are the account's real
            objects, managed with the application's live key, and received
            e-mail is read with it too. A test key sends, reads and cancels
            messages in test mode; a partner's test key (tk_partner_test_) has
            no e-mail at all.; `account_not_active`: The application is not
            approved yet, the account is banned, or a partner disabled this
            application. All four causes share this one response.;
            `ip_not_allowed`: The caller's IP does not match the key's
            `ip_allowlist` (exact IPs and/or CIDR ranges, IPv4 and IPv6).;
            `insufficient_scope`: The key was not granted this call: a custom
            key without this product, or with a level below the call, such as a
            key that checks where the call sends. The response header
            `WWW-Authenticate` names the scope the call needs. Judged right
            after the key is recognised, before `account_not_active` and the
            request's shape. This operation needs `email:send`.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        enum:
                          - live_key_required
                          - account_not_active
                          - ip_not_allowed
                          - insufficient_scope
          headers:
            WWW-Authenticate:
              description: >-
                Sent with `insufficient_scope` only: the scope this operation
                needs, which the key was not granted.
              schema:
                type: string
              example: Bearer error="insufficient_scope", scope="email:send"
        '404':
          description: >-
            Unknown id / `service_not_found`: Partner key, but
            `application`/`service` does not match any of that partner's
            provisioned applications.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        enum:
                          - service_not_found
                          - not_found
              examples:
                unknown_id:
                  summary: Unknown id
                  value:
                    error: not_found
        '409':
          description: >-
            Not scheduled / `message_not_scheduled`: The message is no longer
            `scheduled`: it was sent, failed or canceled. The body adds
            `status`, its status now. Nothing changed.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        enum:
                          - message_not_scheduled
              examples:
                not_scheduled:
                  summary: Not scheduled
                  value:
                    error: message_not_scheduled
                    message: Only a scheduled message can be canceled
                    status: delivered
        '429':
          description: >-
            `rate_limited`: The account made its requests for this second: a
            thousandth of its daily limit, never fewer than 10 a second (10 at
            the default), counted for all its applications, keys and the SMTP
            relay together; a batch counts once. Nothing was recorded or
            charged. `Retry-After: 1`; the `RateLimit-*` headers on every send
            say where the account stands. On the domain endpoints: an
            application adds at most ten domains a minute and checks them at
            most six a minute; `Retry-After` says when to try again.;
            `too_many_requests`: Per-key rate limit exceeded (default 120
            requests/minute, fixed 60s window; 1,200 on the e-mail endpoints).
            Checked before authentication. The `Retry-After` header gives the
            seconds to the next window.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        enum:
                          - rate_limited
                          - too_many_requests
          headers:
            Retry-After:
              description: >-
                Seconds to wait: 1 with `rate_limited` (the account's second),
                the seconds to the next minute with `too_many_requests` (the
                key's minute). `daily_cap_reached` carries none.
              schema:
                type: string
                pattern: ^[0-9]+$
            RateLimit-Limit:
              description: >-
                The account's requests a second on the e-mail routes, for all
                its applications, keys and the SMTP relay together: max(10, its
                daily limit / 1000).
              schema:
                type: string
                pattern: ^[0-9]+$
            RateLimit-Remaining:
              description: Requests left in this second.
              schema:
                type: string
                pattern: ^[0-9]+$
            RateLimit-Reset:
              description: Seconds until the next second opens (0 or 1).
              schema:
                type: string
                pattern: ^[0-9]+$
            Tawked-Daily-Remaining:
              description: E-mails (recipients) left today, a Riyadh day.
              schema:
                type: string
                pattern: ^[0-9]+$
        '500':
          description: >-
            `internal_error`: An unhandled server error. Quote the X-Request-Id
            header if you report it.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - properties:
                      error:
                        enum:
                          - internal_error
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -X POST
            https://tawked.com/v1/email/messages/0199f1c2-7a41-7c3e-9d2b-5e8f1a2b3c4d/cancel
            \
              -H "Authorization: Bearer tk_live_xxxxxxxxxxxxxxxxxxxx"
        - lang: javascript
          label: Node.js
          source: >-
            const res = await
            fetch("https://tawked.com/v1/email/messages/0199f1c2-7a41-7c3e-9d2b-5e8f1a2b3c4d/cancel",
            {
              method: "POST",
              headers: {
                Authorization: "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx",
              },
            });

            const data = await res.json();
        - lang: python
          label: Python
          source: |-
            import requests

            res = requests.post(
                "https://tawked.com/v1/email/messages/0199f1c2-7a41-7c3e-9d2b-5e8f1a2b3c4d/cancel",
                headers={"Authorization": "Bearer tk_live_xxxxxxxxxxxxxxxxxxxx"},
            )
            data = res.json()
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: A stable machine-readable code; the docs list every one.
      additionalProperties: true
  securitySchemes:
    bearerKey:
      type: http
      scheme: bearer
      description: >-
        Authorization: Bearer <api key>. An application key (tk_live_, tk_test_)
        has full access, which covers every product and any product added later,
        or custom access, chosen when the key is created: one or more of the
        scopes `verify:check`, `verify:send` (includes `verify:check`),
        `notifications:read`, `notifications:send` (includes
        `notifications:read`), `email:read`, `email:send` (includes
        `email:read`), `email:manage` (includes `email:send`),
        `webhooks:manage`, `email:inbound`, `notifications:templates` (includes
        `notifications:read`), `chat:menus`, `chat:attendant`. No key made on
        the API keys page holds `notifications:templates`, full access included:
        the three template writes answer such a key 403 `insufficient_scope`. A
        connected app's key holds it. Nor `chat:menus`: the five conversation
        menu operations answer such a key 403 `insufficient_scope`, and a
        connected app's key holds it once the client approved it. Nor
        `chat:attendant`: the five auto-attendant operations answer such a key
        403 `insufficient_scope` too, and a connected app's key holds it once
        the client approved it. `email:manage` and `webhooks:manage` are held
        only by a key someone chose them for: a full-access key, old or new,
        never holds them. `email:inbound`, which reads, deletes and forwards
        received e-mail, is opt-in on every key, full access included: a key
        holds it only when it was turned on when the key was created. A call
        outside the key's access answers 403 `insufficient_scope` and names the
        scope it needs in the `WWW-Authenticate` response header. A partner key
        (tk_partner_) always has full access. Whatever its access, a key is a
        server-side secret.
    headerKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        The same API key, with the same access, as a header, for clients that
        cannot set Authorization.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.