Get SMS delivery metrics for a page of campaigns
POST
/api/v3/channels/{channel}/sms/delivery-metrics
const url = 'https://api.tryletterhead.com/api/v3/channels/example/sms/delivery-metrics';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"api":true,"letters":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.tryletterhead.com/api/v3/channels/example/sms/delivery-metrics \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "api": true, "letters": [ "example" ] }'Per-campaign SMS delivery metrics — delivered ÷ accepted — for a page of the channel’s SMS campaigns, addressed by their letter uniqueIds.
This endpoint is gated behind an internal feature flag that is not yet enabled for any tenant. While it’s off, the endpoint returns an empty list.
v3 endpoints expect a company API key.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” channel
required
string
The newsletter’s channel identifier (slug).
Request Body required
Section titled “Request Body required ” Media type application/json
object
api
Required. Set to true to authenticate with an API key.
boolean
letters
required
Up to 100 letter uniqueIds to report on.
Array<string>
Example generated
{ "api": true, "letters": [ "example" ]}Responses
Section titled “ Responses ”200 OK
Media type application/json
object
items
Array<object>
object
uniqueId
string
accepted
integer
delivered
integer
deliveryRate
number
undelivered
integer
pending
integer
held
integer
stranded
integer
planned
integer
rejected
integer
skipped
integer
message
string
total
integer
Example
{ "items": [ { "uniqueId": "an-example-letter-uid", "accepted": 1000, "delivered": 940, "deliveryRate": 0.94, "undelivered": 60, "pending": 0, "held": 0, "stranded": 0, "planned": 0, "rejected": 0, "skipped": 0 } ], "message": "Ok", "total": 1}404 Not Found — channel doesn’t match a channel this company owns.
Media type application/json
object
data
Array<object>
object
items
Array<object>
object
message
string
total
integer
Example
{ "data": [], "items": [], "message": "Channel is not found.", "total": 0}Still can’t find what you need? Contact support.