Broadcasts

Update a broadcast

Changed on

Updates a draft or scheduled broadcast (email campaign). Only fields included in the request body change. Clearing scheduled_at demotes a scheduled broadcast back to a draft; setting it on a draft schedules it. A broadcast that is already sending or sent can no longer be edited.

patch/broadcasts/{id}

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Path parameters

id, string required

The broadcast's prefixed id (e.g. bcst_abc123).

Request body

BroadcastRequest required
subject, string

Email subject line. Required to send. Takes the same variables as body.

preview_text, string nullable

Inbox preview line. Takes the same variables as body.

body, string

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.

from, string nullable

Sender address on a verified domain. Defaults to the account's sending address.

reply_to, string nullable

Reply-To address. Defaults to the account's support address.

styled, boolean nullable

Wrap the body in the business's branded layout. Defaults to true.

audience, object

Who receives it. Filters combine as a union, deduplicated by address. Replaced whole on update.

scheduled_at, string date-time nullable

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.

send_now, boolean

Create only: true resolves the audience and starts sending at once, instead of saving a draft.

metadata, object

Your own key/value pairs, returned as-is and filterable on list. Merged into the existing keys on update.

send_to_all, boolean nullable

Every contact on the account. Shorthand for the same field in audience, ignored when audience is given.

lifecycles, string[]

Contacts at these lifecycle stages. Shorthand for the same field in audience, ignored when audience is given.

tag_ids, string[]

Contacts with any of these tags (tag_...). Shorthand for the same field in audience, ignored when audience is given.

fields, object

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.

to, string[]

Literal addresses, for recipients who aren't contacts. Shorthand for the same field in audience, ignored when audience is given.

Response

The updated broadcast

Broadcast required
object, string required
id, string required
subject, string nullable required
preview_text, string nullable required
body, string nullable required
html_body, string nullable required
from, string nullable required
reply_to, string nullable required
styled, boolean required
audience, object required
audience_description, string required
status, 'draft' | 'scheduled' | 'sending' | 'sent' | 'canceled' | 'failed' required
scheduled_at, string date-time nullable required
started_at, string date-time nullable required
sent_at, string date-time nullable required
canceled_at, string date-time nullable required
stats, object required
error, string nullable required
metadata, object required
created_at, string date-time required
updated_at, string date-time required

Changes

    • info

      added the new optional request property audience/fields

    • info

      added the new optional request property fields

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    13 more changes in this revision