Broadcasts
Broadcasts are one-to-many marketing emails sent to a segment of contacts. Create a broadcast in draft, then send it immediately or schedule it for later.
Create a broadcast
POST
/v1/broadcastsCreate a new broadcast in draft status.
Request body
| Parameter | Type | Description |
|---|---|---|
namerequired | string | Internal label for the broadcast. |
fromrequired | string | Sender email address. |
segment_idrequired | string | ID of the segment to send to. |
subjectrequired | string | Email subject line. Supports template variables. |
html | string | HTML email body. |
text | string | Plain text body. Auto-generated from HTML if omitted. |
topic_id | string | Optional topic filter. Only contacts opted into this topic will receive the broadcast. |
reply_to | string | Reply-to address. |
scheduled_at | string (ISO 8601) | Schedule the broadcast for a future time. |
cURL
curl -X POST https://api.txtly.com.au/v1/broadcasts \
-H "Authorization: Bearer tx_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "March Newsletter",
"from": "newsletter@yourdomain.com",
"segment_id": "seg_abc123",
"subject": "What is new in March",
"html": "<h1>March Update</h1><p>Here is what we have been working on...</p>"
}'Response — 201 Created
{
"id": "brd_abc123",
"name": "March Newsletter",
"status": "draft",
"created_at": "2026-03-21T00:00:00Z"
}List broadcasts
GET
/v1/broadcastsList all broadcasts for the current team.
Get a broadcast
GET
/v1/broadcasts/{id}Retrieve a broadcast by ID.
Send a broadcast
POST
/v1/broadcasts/{id}/sendTrigger sending of a draft broadcast. Moves status from draft to queued.
Delete a broadcast
DELETE
/v1/broadcasts/{id}Delete a draft broadcast. Sent broadcasts cannot be deleted.
Broadcast status
Broadcasts follow a linear status progression:
| Parameter | Type | Description |
|---|---|---|
draft | status | Broadcast is being composed. Can be edited or deleted. |
queued | status | Broadcast is queued for sending. Can be cancelled back to draft. |
sending | status | Emails are being dispatched to recipients. |
sent | status | All emails have been dispatched. This is a terminal state. |
Template variables
Broadcast content supports contact property variables. Use double curly braces to insert dynamic values like {{first_name}}, {{email}}, or any custom contact property.