broadcasts

Draft a broadcast to a segment.

Content comes from a template version or an inline body. With send: true it is sent as soon as it is created, or scheduled when scheduled_at is also given: the same send as POST /broadcasts/{id}/send, with the same checks.

post/broadcasts

Request

  • Base URL: https://api.agentisend.com
  • URL: https://api.agentisend.com/broadcasts
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Makes this call safe to retry. Send the same key with the same body and the original response is replayed instead of the work happening twice. Keys are 1-256 characters and are remembered for 7 days. While the first attempt is still running, a second call with that key returns 409 idempotency_in_flight (Resend calls this concurrent_idempotent_requests); the same key with a different body returns 409 idempotency_payload_mismatch (Resend: invalid_idempotent_request). Resend-Idempotency-Key is accepted as the same header.

Resend-Idempotency-Keystring

Alias of Idempotency-Key. Idempotency-Key wins if both are sent.

Request body

namestring

A name for your own reference. Omit it to use the subject.

from_addressstring required

Same as from.

template_idstring uuid
segment_idstring uuid required
subjectstring
textstring

The plain-text body, sent as the plain part of every message. Placeholders work as in html. Omit it to have one derived from the body; an empty string sends no plain-text part.

preview_textstring

The line an inbox shows after the subject. Hidden at the top of the HTML; not shown in the body.

previewTextstring

Resend Node SDK name for preview_text.

topic_idstring uuid

A topic on this account. Contacts who unsubscribed from it are skipped, and each message carries a one-click unsubscribe for this topic.

topicIdstring uuid

Resend Node SDK name for topic_id.

sendboolean

Send the broadcast as soon as it is created. With scheduled_at it is scheduled instead. Defaults to false: the broadcast stays a draft.

scheduled_atstring

When to send. With send: true, an ISO 8601 time or a phrase such as "in 1 hour". Without send, an ISO 8601 time: the broadcast is saved as scheduled.

Response

Success

object'broadcast' required
idstring uuid required
namestring required
statusstring required
from_addressstring nullable required
fromstring nullable required

Same as from_address, under the name Resend uses.

template_idstring uuid nullable required
segment_idstring uuid nullable required
audience_idstring uuid nullable required

Deprecated: the name Resend gave segment_id before segments. Same value.

subjectstring nullable required
contentobject nullable required
htmlstring nullable required

The HTML body as written, placeholders unfilled. null for a broadcast that takes its body from a template.

textstring nullable required

The plain-text body as written. null: none written, so the send derives one. An empty string: opted out of a plain-text part.

reply_tostring[] nullable required

Reply-To on every message the broadcast sends.

preview_textstring nullable required

The line an inbox shows after the subject.

topic_idstring uuid nullable required

The topic whose opt-outs the send honours. A contact who unsubscribed from it is skipped.

scheduled_atstring date-time nullable required
sent_atstring date-time nullable required
sent_countinteger required
archived_atstring date-time nullable required
created_atstring date-time required
updated_atstring date-time required
sentinteger

Messages handed off, when send was true and the broadcast was not scheduled.

skippedinteger

Contacts left out, when send was true.

Changes

No recorded changes to this operation across all 1 revision of this API.