Create a broadcast
Changed onCreates a broadcast, an email campaign to many contacts at once. Omit scheduled_at to save a draft, pass a future timestamp to schedule it, or pass send_now: true to resolve the audience and start sending immediately.
Sending a 1:1 email? Use POST /v1/email/inboxes/{inbox_id}/messages instead — it creates a tracked thread you can reply within.
Request
- Base URLhttps://api.crevio.co/v1
- AuthAPI key in header Authorization
Headers
Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.
Request body
Email subject line. Required to send. Takes the same variables as body.
Inbox preview line. Takes the same variables as body.
Email body. Required to send. Plain text is split into paragraphs at blank lines and may carry inline tags such as <a>; a body with block tags (<p>, <div>, <br>, lists, tables) is used as written. Variables, filled per recipient from their contact record when each batch is sent: {{customer.first_name}}, {{customer.last_name}}, {{customer.email}}, {{business.name}}, {{customer.fields.<key>}}, each with an optional | default: "…". With no default, {{customer.first_name}} falls back to "there" and the others render blank. customer.fields.<key> reads <key> from the contact's metadata. An address in audience.to that belongs to no contact is sent without contact data. Put {{unsubscribe_url}} in an href to place the recipient's opt-out link. Any other {{ }} is rejected with 422.
Sender address on a verified domain. Defaults to the account's sending address.
Reply-To address. Defaults to the account's support address.
Wrap the body in the business's branded layout. Defaults to true.
Who receives it. Filters combine as a union, deduplicated by address. Replaced whole on update.
When to send it. A future timestamp schedules the broadcast; omit it to save a draft. On update, null turns a scheduled broadcast back into a draft. A past time is rejected with 422 invalid_schedule.
Create only: true resolves the audience and starts sending at once, instead of saving a draft.
Your own key/value pairs, returned as-is and filterable on list. Merged into the existing keys on update.
Every contact on the account. Shorthand for the same field in audience, ignored when audience is given.
Contacts at these lifecycle stages. Shorthand for the same field in audience, ignored when audience is given.
Contacts with any of these tags (tag_...). Shorthand for the same field in audience, ignored when audience is given.
Contacts whose custom fields match every pair, such as {"plan_interest": "pro"}. Keys are contact field keys (GET /contacts/fields); a select value is a choice key, and a multi_select matches contacts who have that choice. A key that is not an active field is refused with 422 resource_missing on send. Shorthand for the same field in audience, ignored when audience is given.
Literal addresses, for recipients who aren't contacts. Shorthand for the same field in audience, ignored when audience is given.
Response
The created broadcast
Changes
- info
added the new optional request property
audience/fields - info
added the new optional request property
fields
- info
- warning
added the new
idempotency_errorenum value to theerror/typeresponse property for the response status
11 more changes in this revision
- warning