Emails

Cancel Scheduled Email

Cancel a scheduled email before it is injected into SparkPost, and return the cancelled email.

Breaking change. Cancellation used to be delegated to SparkPost's per-transmission DELETE endpoint, which SparkPost retired — the call failed every time. Lettr now owns the schedule, so a cancellation either genuinely stops the send or says truthfully that it could not.

Only an email in state scheduled can be cancelled. Once the dispatcher has claimed it (sending), or it has already been injected (sent) or cancelled (cancelled), the request fails with 409 schedule_cancellation_failed — SparkPost offers no per-message recall after injection.

A sandbox key can only cancel the emails it scheduled itself.

delete/emails/scheduled/{transmissionId}

Request

  • Base URL: https://app.lettr.com/api
  • URL: https://app.lettr.com/api/emails/scheduled/{transmissionId}
  • Auth: HTTP bearer

Path parameters

transmissionIdstring required
Example:sch_01JQZ3N2K8XW9V6M4TBRC7YHDE

The request_id returned when the email was scheduled (sch_...). A bare SparkPost transmission id is also accepted, for emails scheduled before Lettr owned the schedule.

Response

Scheduled transmission cancelled successfully. The email was never handed to SparkPost.

messagestring required

Example response

{
  "message": "Scheduled transmission cancelled successfully.",
  "data": {
    "request_id": "sch_01JQZ3N2K8XW9V6M4TBRC7YHDE",
    "transmission_id": "12345678901234567890",
    "state": "scheduled",
    "scheduled_at": "2024-01-16T10:00:00Z",
    "from": "sender@example.com",
    "from_name": "Sender Name",
    "subject": "Scheduled Newsletter",
    "recipients": [
      "recipient@example.com"
    ],
    "num_recipients": 1,
    "accepted": 1,
    "tag": "welcome-series-2024",
    "events": [
      {
        "event_id": "7609871845907017144",
        "timestamp": "2024-01-15T10:31:00.000Z",
        "request_id": "7610639000055488914",
        "rcpt_to": "recipient@example.com",
        "raw_rcpt_to": "recipient@example.com",
        "recipient_domain": "example.com",
        "mailbox_provider": "Gmail",
        "mailbox_provider_region": "Global",
        "message_id": "699715cd9e6961853a97",
        "subject": "Welcome to Lettr",
        "friendly_from": "sender@example.com",
        "sending_domain": "example.com",
        "sending_ip": "168.203.51.91",
        "msg_size": 30823,
        "injection_time": "2024-01-15T10:30:00.000Z",
        "campaign_id": "welcome-series",
        "template_id": "template_7610639000055488914",
        "template_version": "0",
        "ip_pool": "default",
        "msg_from": "msprvs1=abc123=bounces@sparkpostmail1.com",
        "delv_method": "esmtp",
        "recv_method": "rest",
        "routing_domain": "gmail.com"
      }
    ]
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.