Create a broadcast from a template
Create a DRAFT broadcast with its own copy of a template's subject, preview text and body: changing the template later never changes the broadcast, and…
https://app.usenotix.dev/api/v1/broadcasts/from-templateNeeds a full access key. Sending access keys cannot call this. Key permissions lists the extra rules some calls have.
Create a DRAFT broadcast with its own copy of a template's subject, preview text and body: changing the template later never changes the broadcast, and the other way round. A template without an unsubscribe link gets the standard footer. Every check a new broadcast meets runs (the sender's domain, the contact book and segment). Nothing is sent or scheduled.
Who can call it
A full access key, whoever on the team made it (as for creating a broadcast; on the dashboard any member edits broadcasts), or a live AI key. Every refusal is 403:
| Code | Why |
|---|---|
SCOPE_DENIED | A send-only or read-only key. |
FORBIDDEN | A live AI key changing a broadcast it did not create itself, or setting cc, bcc, or a reply-to off its domain; or a sender on a domain the key may not send from. |
A key limited to one domain sees only broadcasts that send from its domain (any other answers 404), and keeps the sender on that domain. The team can make 60 of these changes a minute; when Notix cannot count them the answer is 503 SERVICE_UNAVAILABLE (try again shortly), never a 429.
Body parameters
The template to copy. The campaign gets its own copy of its subject, preview text and body.
At most 255 characters.
The sender, on a verified domain of the team (and the key's own, for a key limited to one).
At least 3 characters. At most 320 characters.
Send only to this segment of the contact book.
Defaults to the template's subject.
At most 998 characters.
Headers
Bearer followed by your API key.
Errors
The body, sender, contact book or segment is not valid, or the template has no subject and none was given.
`SCOPE_DENIED`: a send-only or read-only key. `FORBIDDEN`: a live AI key changing a campaign it did not create, or a sender the key may not send from.
No template with this id for the calling team.
The team made or changed 60 campaigns from templates in the last minute.
The call could not be counted just now. Try again shortly.
Every error has the same shape. See all error codes.
curl -X POST "https://app.usenotix.dev/api/v1/broadcasts/from-template" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "cm1x8f3k20001qz7v5b9d2e4a",
"name": "Acme",
"from": "Acme <news@acme.com>",
"contactBookId": "cm1x8f3k20001qz7v5b9d2e4a",
"subject": "Your receipt for order 4471"
}'
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
const { data, error } = await notix.broadcasts.createFromTemplate({
templateId: "tpl_123",
name: "October news",
from: "Acme <news@acme.com>",
contactBookId: "cb_123",
});
{
"id": "cm1x8f3k20001qz7v5b9d2e4a",
"name": "Acme",
"from": "Acme <receipts@acme.com>",
"subject": "Your receipt for order 4471",
"previewText": "Thanks for your order.",
"contactBookId": "cm1x8f3k20001qz7v5b9d2e4a",
"segmentId": "cm1x8f3k20001qz7v5b9d2e4a",
"html": "<p>Thanks for your order.</p>",
"content": "string",
"status": "string",
"scheduledAt": "2026-10-01T09:00:00Z",
"batchSize": 1,
"batchWindowMinutes": 1,
"total": 1,
"maxRecipients": 1,
"sent": 1,
"delivered": 1,
"opened": 1,
"clicked": 1,
"unsubscribed": 1,
"bounced": 1,
"hardBounced": 1,
"complained": 1,
"replyTo": [
"string"
],
"cc": [
"string"
],
"bcc": [
"string"
],
"createdAt": "2026-10-01T09:00:00Z",
"updatedAt": "2026-10-01T09:00:00Z"
}