Validate and send (or schedule) a draft broadcast
Only callable from draft (else 409 not_draft). Requires a non-empty subject, a non-empty body_html or body_text, a target that still resolves, and a verified from_domain_id. Computes a best-effort total_recipients snapshot, then sets status = scheduled (if scheduled_at is in the future) or status = sending (the fan-out cron picks it up on its next per-minute tick — this call does not enqueue anything itself).
bearerAuthAuthorizationBearer <token>API key sent as Authorization: Bearer <key>. Looked up by SHA-256
hash (email_core::sha256_hex) against api_keys.hash; revoked
keys and keys belonging to a suspended tenant are rejected. See the
top-level Authentication section for permission levels.
id*stringapplication/json- body
scheduled_at?integerEpoch milliseconds. Omitted or in the past → send now.
int64Transitioned to scheduled or sending.
application/json- response
id?stringname?stringsubject?stringfrom_domain_id?string|nullbody_html?string|nullbody_text?string|nulltarget_kind?|"audience""segment"nulltarget_id?string|nullstatus?string"draft""scheduled""sending""paused""sent""cancelled"scheduled_at?|int64total_recipients?integerA best-effort snapshot computed at send time (audience member count, or a segment's live match count).
sent_count?integerAdvanced by the fan-out cron as recipients are enqueued.
created_at?integerint64updated_at?integerint64sent_at?|int64curl -X POST "https://example.com/v1/broadcasts/string/send" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "subject": "string", "from_domain_id": "string", "body_html": "string", "body_text": "string", "target_kind": "audience", "target_id": "string", "status": "draft", "scheduled_at": 0, "total_recipients": 0, "sent_count": 0, "created_at": 0, "updated_at": 0, "sent_at": 0}