Broadcasts
Broadcasts send marketing email to an audience or segment. Always include a topic and
{{{unsubscribe_url}}} merge tag.
Create broadcast
POST
/v1/broadcasts | Field | Type | Required | Description |
|---|---|---|---|
| audienceId | string | Conditional | Audience to send to. Required if segmentId is absent. |
| segmentId | string | Conditional | Target a saved segment instead of a full audience. |
| from | string | Required | Verified from address. |
| subject | string | Required | Subject; supports merge tags like {{firstName}}. |
| html | string | Conditional | HTML body or use templateId. |
| templateId | string | Optional | Template id. |
| topicId | string | Optional | Preference topic for marketing unsubscribe. |
| replyTo | string | Optional | Reply-To address. |
| scheduleAt | string | Optional | Schedule send time (ISO 8601). Omit → draft. |
Send broadcast
POST
/v1/broadcasts/{id}/send Transitions a draft broadcast to sending. Returns the broadcast with status sending.
List & retrieve
GET
/v1/broadcasts GET
/v1/broadcasts/{id} Broadcast object
{
"id": "brd_01",
"status": "draft",
"audienceId": "aud_onboarding",
"subject": "Welcome",
"createdAt": "2026-07-12T09:00:00Z"
}Examples
Node.js
import { Xurel } from 'xurel';
const xurel = new Xurel(process.env.XUREL_API_KEY);
const broadcast = await xurel.broadcasts.create({
audienceId: 'aud_onboarding',
from: 'hello@yourdomain.com',
subject: 'Welcome, {{firstName}}',
html: '<p>Hi {{firstName}},</p><p>Thanks for joining.</p><p><a href="{{{unsubscribe_url}}}">Unsubscribe</a></p>',
});
await xurel.broadcasts.send(broadcast.id); cURL
curl https://api.xurel.co/v1/broadcasts \
-H "Authorization: Bearer $XUREL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"audienceId": "aud_onboarding",
"from": "hello@yourdomain.com",
"subject": "Welcome",
"html": "<p>Hi</p><a href=\"{{{unsubscribe_url}}}\">Unsub</a>",
"topicId": "top_product"
}'