Check a broadcast before sending it
Answers what POST /v1/broadcasts would do with the same body, without sending anything: how many people it reaches, who is skipped, the first five texts filled in, and when the last one should go.
/v1/broadcasts/preview
Answers what POST /v1/broadcasts would do with the same body, without sending anything: how many people it reaches, who is skipped, the first five texts filled in, and when the last one should go.
Needs a key with the messages:read scope.
Send an Idempotency-Key so a retry never acts twice.
Headers
Idempotency-KeystringAny string of up to 255 characters, new for each request. A retry with the same key gets the first answer back for 24 hours, with
Idempotent-Replayed: true.Up to 255 characters.
Request body
textstringThe words.
Up to 2,000 characters.
template_idstringA saved template to use instead of
text.Starts with
tpl_.tagsarray of stringsUp to 20 items.
contact_idsarray of stringsUp to 500 items.
recipientsarray of objectUp to 500 items.
Show its 4 fieldsHide its fields
tostringrequiredA phone number (US numbers may leave off +1;
(555) 555-0123works) or an email address an Apple ID uses.3 to 320 characters.
first_namestringUp to 100 characters.
last_namestringUp to 100 characters.
variablesmap of stringValues for this person’s
{{variables}}.
send_attimestamp
Example
/v1/broadcasts/previewcurl -X POST "https://usebluebot.com/api/v1/broadcasts/preview" \
-H "Authorization: Bearer $BLUEBOT_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: 0f6d8c2e-5b1a-4c7e-9d3f-2a8b6e1c4d70" \
-d '{
"text": "Hi {{first_name|there}}, open house at 412 Oak St this Saturday 1–4.",
"tags": [
"buyer"
]
}'Response
200: What it would do.
object"broadcast_preview"requiredrecipient_countintegerrequiredEveryone it would go to, counting people on your stop list.
stopped_countintegerrequiredPeople on your stop list, who won’t get it.
new_people_countintegerrequiredPeople you have never texted, who count toward your daily limit for new people.
duplicate_countintegerrequiredRows dropped because the same person was already in the list.
samplesarray of objectrequiredThe first five people’s texts.
Show its 4 fieldsHide its fields
handlestringrequiredA phone number in E.164 (
+15555550123) or an email address an Apple ID uses (iMessage only).namestring or nullrequiredtextstringrequiredTheir text, filled in.
missingarray of stringsrequiredVariables they had no value for, which were left empty.
estimateBroadcastEstimate or nullrequiredWhen the broadcast’s texts should go, worked out with your sending rules.
Show its 6 fieldsHide its fields
first_attimestamp or nullrequiredWhen the first text should go.
last_attimestamp or nullrequiredWhen the last text should go, given your pace, quiet hours and daily limits.
daysintegerrequiredHow many days the sending spans in your time zone.
waits_forarray of stringsrequiredHolds the texts will meet on the way:
quiet_hours,daily_new_people_limit,platform_daily_limit.blocked_bystring or nullrequiredA hold with no end that stops the broadcast from going, such as
plan_lapsed.mac_onlinebooleanrequiredWhether your Mac is online now. The estimate assumes it stays on.
{
"object": "broadcast_preview",
"recipient_count": 42,
"stopped_count": 1,
"new_people_count": 3,
"duplicate_count": 0,
"samples": [
{
"handle": "+15555550123",
"name": "Maria Alvarez",
"text": "Hi Maria, open house at 412 Oak St this Saturday 1–4.",
"missing": []
}
],
"estimate": {
"first_at": "2026-11-14T15:00:00.000Z",
"last_at": "2026-11-14T15:14:20.000Z",
"days": 1,
"waits_for": [],
"blocked_by": null,
"mac_online": true
}
}Errors
Every refusal has the same envelope and a page of its own. These are the ones this operation can give.
| Code | Status | What it means |
|---|---|---|
| 401 | The request carried no key, or a key BlueBot doesn’t know: mistyped, revoked, or a test key sent to the live API. | |
| 403 | The key doesn’t carry the scope the endpoint needs. Each endpoint’s reference names its scope. | |
| 429 | Too many requests. A key may make 120 requests a minute. The RateLimit header says how many are left, and Retry-After how long to wait. | |
| 500 | Something went wrong on BlueBot’s side. It was reported. Send the request again; with an Idempotency-Key that is always safe. | |
| 400 | Something in the request doesn’t fit: a missing or malformed field, a bad id, or a combination the endpoint refuses. details names each field. | |
| 404 | There is no such thing on this account. Ids are prefixed by kind, so a message id starts with msg_. | |
| 409 | The account has as many of something as it may have. |
Try it
Call this operation from the page with your own key. The key stays in this tab and is forgotten when you leave.