curl --request GET \
--url https://app.lettr.com/api/emails/scheduled/{transmissionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.lettr.com/api/emails/scheduled/{transmissionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.lettr.com/api/emails/scheduled/{transmissionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.lettr.com/api/emails/scheduled/{transmissionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.lettr.com/api/emails/scheduled/{transmissionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.lettr.com/api/emails/scheduled/{transmissionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.lettr.com/api/emails/scheduled/{transmissionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Scheduled transmission retrieved successfully.",
"data": {
"request_id": "sch_01JQZ3N2K8XW9V6M4TBRC7YHDE",
"transmission_id": null,
"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,
"rejected": 0,
"tag": null,
"failure_reason": null,
"events": []
}
}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.
curl --request GET \
--url https://app.lettr.com/api/emails/scheduled/{transmissionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.lettr.com/api/emails/scheduled/{transmissionId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.lettr.com/api/emails/scheduled/{transmissionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.lettr.com/api/emails/scheduled/{transmissionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.lettr.com/api/emails/scheduled/{transmissionId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.lettr.com/api/emails/scheduled/{transmissionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.lettr.com/api/emails/scheduled/{transmissionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "Scheduled transmission retrieved successfully.",
"data": {
"request_id": "sch_01JQZ3N2K8XW9V6M4TBRC7YHDE",
"transmission_id": null,
"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,
"rejected": 0,
"tag": null,
"failure_reason": null,
"events": []
}
}Authorizations
API key for authentication
Path Parameters
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.
"sch_01JQZ3N2K8XW9V6M4TBRC7YHDE"
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.
- Option 1
- Option 2
Returned for a sch_... id that Lettr knows about.
"Scheduled transmission retrieved successfully."
A scheduled email held by Lettr. This is the data object of POST /emails/scheduled, GET /emails/scheduled/{transmissionId} and DELETE /emails/scheduled/{transmissionId}, and each entry of scheduled_emails in GET /emails/scheduled.
Breaking change. Scheduled emails are no longer parked inside SparkPost with options.start_time — SparkPost retired its per-transmission GET and DELETE endpoints. Lettr now holds the email in its own store and injects it into SparkPost when it is due, so request_id is Lettr's own sch_... id, transmission_id is a separate field that stays null until injection, and state values are Lettr's own rather than SparkPost's pass-through states.
Show child attributes
Show child attributes
Was this page helpful?