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/broadcasts

Create a new broadcast in draft status.

Request body

ParameterTypeDescription
namerequiredstringInternal label for the broadcast.
fromrequiredstringSender email address.
segment_idrequiredstringID of the segment to send to.
subjectrequiredstringEmail subject line. Supports template variables.
htmlstringHTML email body.
textstringPlain text body. Auto-generated from HTML if omitted.
topic_idstringOptional topic filter. Only contacts opted into this topic will receive the broadcast.
reply_tostringReply-to address.
scheduled_atstring (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/broadcasts

List 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}/send

Trigger 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:

ParameterTypeDescription
draftstatusBroadcast is being composed. Can be edited or deleted.
queuedstatusBroadcast is queued for sending. Can be cancelled back to draft.
sendingstatusEmails are being dispatched to recipients.
sentstatusAll 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.