Broadcasts
Send a marketing email to a segment.
Personalisation#
Use triple braces: {{{FIRST_NAME|there}}} (with a fallback), {{{LAST_NAME}}}, {{{EMAIL}}}, any contact property, and {{{IRESENDLY_UNSUBSCRIBE_URL}}} (or {{{UNSUBSCRIBE_URL}}}). Values are HTML-escaped in the HTML body. If the body has no unsubscribe link we add one, plus one-click List-Unsubscribe headers; plain-text bodies get an Unsubscribe: line.
- Unsubscribed contacts and suppressed addresses are skipped.
- A broadcast pauses itself when, after at least 100 emails, more than 5% bounce or complain. It also pauses when your quota runs out. Sending it again resumes it.
Create a broadcast
/broadcastsCreates a draft. The sender's domain is checked when you send it.
segment_idstringrequiredThe segment to send to (
audience_idalso works).fromstringrequiredSender on a verified domain.
subjectstringrequiredSubject line.
html · text · template_idstringThe body: HTML, plain text, or a published template's id.
reply_tostring | string[]Reply-To.
preview_textstringInbox preview, up to 500 characters.
namestringInternal name. Defaults to the subject.
curl -X POST 'https://api.iresendly.com/broadcasts' \
-H 'Authorization: Bearer irs_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"segment_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"from": "Acme <news@acme.com>",
"subject": "November update",
"html": "<p>Hi {{{FIRST_NAME|there}}}</p>"
}'{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}Send a broadcast
/broadcasts/{id}/sendSends a draft (or resumes a paused broadcast) now, or at scheduled_at. The segment needs at least one subscribed contact.
idstringrequiredThe broadcast id.
scheduled_atstringISO 8601 or
in ….
curl -X POST 'https://api.iresendly.com/broadcasts/{id}/send' \
-H 'Authorization: Bearer irs_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"scheduled_at": "in 1 hour"
}'{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}Retrieve a broadcast
/broadcasts/{id}Status, content and delivery counts.
idstringrequiredThe broadcast id.
curl -X GET 'https://api.iresendly.com/broadcasts/{id}' \
-H 'Authorization: Bearer irs_xxxxxxxxx'{
"object": "broadcast",
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
"name": "November update",
"audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"status": "sent",
"stats": {
"recipients": 1204,
"sent": 1204,
"failed": 0
}
}curl -X PATCH 'https://api.iresendly.com/broadcasts/{id}' \
-H 'Authorization: Bearer irs_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"subject": "November update (final)"
}'{
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794"
}List broadcasts
/broadcastsNewest first.
limitnumberResults per page, 1–100. Default 20.
afterstringReturn results after this id (next page).
beforestringReturn results before this id (previous page). Don't send with
after.
curl -X GET 'https://api.iresendly.com/broadcasts' \
-H 'Authorization: Bearer irs_xxxxxxxxx'{
"object": "list",
"has_more": false,
"data": []
}Delete or cancel a broadcast
/broadcasts/{id}Deletes a draft, or cancels one that's scheduled, queued or paused. Broadcasts that are sending or sent can't be deleted (422).
idstringrequiredThe broadcast id.
curl -X DELETE 'https://api.iresendly.com/broadcasts/{id}' \
-H 'Authorization: Bearer irs_xxxxxxxxx'{
"object": "broadcast",
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
"deleted": true
}