Emails

Get Scheduled Email

Retrieve a scheduled email by the request_id returned when it was scheduled (sch_...).

Breaking change. Scheduled emails are no longer parked inside SparkPost with options.start_time, because SparkPost retired its per-transmission GET endpoint. Lettr now answers from its own store, so the response is correct the instant the email is scheduled and a cancelled email can be told apart from one that never existed. request_id is Lettr's own sch_... id, SparkPost's id is the separate transmission_id field (null until the email is injected, and the value that appears as transmission_id on your webhook events), and state is one of scheduled, sending, sent, cancelled or failed.

For emails scheduled before this change there is no Lettr record, only the SparkPost transmission id you stored. Those ids are still accepted and fall back to a delivery-events lookup, which returns the old response shape (ShowScheduledTransmissionResponse, with SparkPost's pass-through state values and no request_id).

A sandbox key only sees the emails it scheduled itself.

get/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; those return the legacy response shape.

Response

Scheduled transmission retrieved successfully. Returns the scheduled email when Lettr knows the id, or the legacy events-derived shape for a SparkPost transmission id from before this change.

OR

Example response

{
  "message": "Scheduled transmission retrieved 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.