Skip to content
Letterhead Letterhead Letterhead Help Center
Admin Tools

Get the SMS send-audience count for a channel

POST
/api/v3/channels/{channel}/sms/audience-count
curl --request POST \
--url https://api.tryletterhead.com/api/v3/channels/example/sms/audience-count \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "api": true, "segments": [ 1 ], "excludeSegments": [ 1 ] }'

The number of contacts an SMS send to this audience selection would actually reach — the same resolved recipient count the schedule screen previews before sending.

This endpoint is gated behind an internal feature flag that is not yet enabled for any tenant. While it’s off, the endpoint returns 0.

v3 endpoints expect a company API key.

channel
required
string

The newsletter’s channel identifier (slug).

Media type application/json
object
api

Required. Set to true to authenticate with an API key.

boolean
segments

Segment ids to include. 0 is the built-in “All active subscribers” segment and counts as a member of the inclusion set.

Array<integer>
excludeSegments

Segment ids to hold back from the send. 0 is not accepted here — it would exclude everyone.

Array<integer>
Example generated
{
"api": true,
"segments": [
1
],
"excludeSegments": [
1
]
}

200 OK

Media type application/json
object
items
Array<object>
object
message
string
total

The eligible recipient count.

integer
Example
{
"items": [],
"message": "SMS send audience count retrieved.",
"total": 4213
}

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.