Broadcasts API
The broadcasts resource is the public campaign control plane for one-off messages. This guide explains draft management, test sends, live-send safety, and why integrations and agents should treat send actions as high-impact operations.
Manage One-Off Campaign Drafts
Broadcasts are one-off campaigns sent to subscribers. The public broadcasts API lets integrations create drafts, inspect existing broadcasts, update campaign details, send test emails, and send a broadcast only when the broadcast is ready.
Creating or updating a broadcast does not send the broadcast. Sending is a separate action because a live send can reach real subscribers. This separation helps you build safer migrations, campaign operations tools, and external approval workflows.
Use the API to prepare campaign records. When a campaign affects real subscribers, make the human review steps clear before live sending.
- Create the broadcast as a draft.
- Set the subject, preview text, body, and any required campaign metadata.
- Select or store the segment or filter rules that choose the intended subscribers, then ask a user to review the subscribers in Broadcasts before live sending.
- Send a test email with the test endpoint.
- If your integration manages approvals, record the reviewer and approval state in your own system.
- Call the live send endpoint only after the subscribers, content, sender, and send timing are approved.
- After sending, read the broadcast results from Mailrith. Do not assume the send completed instantly.
- Create broadcasts as drafts when you migrate campaigns or prepare campaign work for review.
- Use test sends before live sends so reviewers can inspect the rendered email.
- Use live send endpoints only after your workflow confirms the subscribers, subject, content, and compliance requirements.
- Store the returned broadcast ID if another system must link approvals or audit records to the Mailrith campaign.
Endpoint Overview
Collection and item endpoints manage broadcast records. Use these endpoints to list, create, inspect, update, and delete broadcasts.
POST /v1/broadcasts/{broadcast_id}/test sends a test email to a reviewer. Use this endpoint in review workflows, but do not send test emails to large or uncontrolled lists.
GET /v1/broadcasts/{broadcast_id}/preflight checks the current Subscriber estimate, provider capacity, sender setup, and high-volume confirmation requirement.
POST /v1/broadcasts/{broadcast_id}/send accepts the live send asynchronously and returns 202 Accepted with a run ID. In internal tools and agent workflows, require explicit approval before calling this endpoint.
GET /v1/broadcasts/{broadcast_id}/progress returns bounded progress. GET /v1/broadcasts/{broadcast_id}/delivery-errors returns cursor-paginated permanent failures and unknown results.
POST /v1/broadcasts/{broadcast_id}/cancel requests cancellation for work that has not reached the provider. It cannot recall provider-accepted email.
/v1/broadcasts List broadcasts
Returns broadcast drafts, scheduled sends, active sends, and completed sends.
View Schema /v1/broadcasts Create a broadcast
Creates a broadcast draft or scheduled broadcast in the authenticated workspace.
View Schema /v1/broadcasts/{broadcast_id} Get a broadcast
Returns a broadcast draft, scheduled send, active send, or completed send.
View Schema /v1/broadcasts/{broadcast_id} Update a broadcast
Updates a broadcast draft or scheduled send in place.
View Schema /v1/broadcasts/{broadcast_id} Delete a broadcast
Deletes a draft, scheduled, or failed broadcast from the authenticated workspace. Broadcasts cannot be deleted after they start sending.
View Schema /v1/broadcasts/{broadcast_id}/cancel Cancel a broadcast send
Requests cancellation for delivery work that has not reached the provider. Provider-accepted emails cannot be recalled. Repeat the same request with the same idempotency key when the response is lost.
View Schema /v1/broadcasts/{broadcast_id}/delivery-errors List broadcast delivery errors
Returns a cursor-paginated page of permanent failures and unknown delivery results.
View Schema /v1/broadcasts/{broadcast_id}/preflight Check a broadcast before sending
Checks the current Subscriber estimate, provider capacity, sender setup, event tracking, and high-volume confirmation requirement.
View Schema /v1/broadcasts/{broadcast_id}/progress Get broadcast send progress
Returns bounded delivery progress, current rates, timing, outcome counts, and pause state. Poll until terminal is true; use 5 to 10 second intervals while progress changes and back off to 30 seconds when unchanged.
View Schema /v1/broadcasts/{broadcast_id}/send Send a broadcast now
Accepts asynchronous delivery for a broadcast draft or scheduled send. A 202 response means the durable send was accepted, not that provider delivery is complete. Reuse the same idempotency key if the response is lost.
View Schema /v1/broadcasts/{broadcast_id}/test Send a broadcast test email
Sends a test message from an existing broadcast to one recipient.
View Schemacurl -X POST https://api.mailrith.com/v1/broadcasts/broadcast_123/test \
-H "Authorization: Bearer mrk_example_secret_key" \
-H "Idempotency-Key: broadcast-123-test-1" \
-H "Content-Type: application/json" \
-d '{
"recipient_email": "reviewer@example.com"
}' Start and Poll an Asynchronous Send
A 202 Accepted response means Mailrith saved the send request and queued durable preparation. It does not mean every email was delivered or accepted by the provider. Store run_id, then poll the progress endpoint until terminal is true.
Use an Idempotency-Key on send and cancellation requests. If your connection drops before you receive the response, repeat the same method, path, body, and key. Do not create a new key for an uncertain retry.
Poll once after 5 seconds, then use 10-second intervals while the send is changing. After several unchanged responses, increase the interval to 30 seconds. Stop when terminal is true. Always honor Retry-After after a 429 response.
Cancellation returns 202 Accepted. A status of canceling means remaining work is stopping. A status of canceled means cancellation already finished. changed says whether this request changed durable state. If recovery_pending is true, the request is saved and recovery will continue it even though the immediate Queue wake could not be sent.
-
phasedescribes preparing, sending, paused, canceling, sent, sent with errors, canceled, or failed work. -
materializedis the number of prepared Subscriber deliveries.acceptedis the number accepted by the provider. -
retryingis work waiting for a safe retry.permanent_failedwill not be retried automatically. -
unknownmeans Mailrith cannot prove whether the provider accepted the email. Do not automatically retry unknown results. -
percent_complete,effective_rate,estimated_completion,pause_reason, andnext_retry_atcan change as provider capacity changes. - The compatible Broadcast status remains
runningwhile active andcompletedafter terminal processing. Use progressphaseand outcome counts for the detailed result. - Cancellation returns
broadcast_send_not_foundwhen no durable send exists,broadcast_cancel_finalization_startedorbroadcast_cancel_already_finishedwhen the run can no longer be canceled, andbroadcast_cancel_concurrent_updatewhen another control action won the state change. Read the latest progress before deciding what to do next.
curl https://api.mailrith.com/v1/broadcasts/broadcast_123/preflight \
-H "Authorization: Bearer mrk_example_secret_key"
curl -X POST https://api.mailrith.com/v1/broadcasts/broadcast_123/send \
-H "Authorization: Bearer mrk_example_secret_key" \
-H "Idempotency-Key: broadcast-123-send-1" \
-H "Content-Type: application/json" \
-d '{
"confirmation": {
"workspace_id": "workspace_123",
"subject": "April Launch",
"recipient_estimate": 1000000,
"connection_id": "connection_123",
"estimated_duration_seconds": 2000
}
}' curl https://api.mailrith.com/v1/broadcasts/broadcast_123/progress \
-H "Authorization: Bearer mrk_example_secret_key"
curl "https://api.mailrith.com/v1/broadcasts/broadcast_123/delivery-errors?limit=100" \
-H "Authorization: Bearer mrk_example_secret_key" curl -X POST https://api.mailrith.com/v1/broadcasts/broadcast_123/cancel \
-H "Authorization: Bearer mrk_example_secret_key" \
-H "Idempotency-Key: broadcast-123-cancel-1" Handle Preflight, Rate, and Quota Problems
Read every blocking_issues item before starting. Each item includes a stable code, a plain-language message, and a resolution. Run preflight again after correcting the connection or sender setup because Subscriber counts and provider capacity can change.
A send can return a conflict when the high-volume confirmation no longer matches the current workspace, subject, Subscriber estimate, connection, or estimated duration. Fetch a new preflight instead of resubmitting old confirmation data.
-
broadcast_provider_quota_unavailable: Mailrith could not verify safe provider capacity. Check the connection or reviewed provider limits. -
broadcast_provider_production_access_required: the provider account cannot send production volume yet. -
broadcast_provider_daily_quota_insufficient: the remaining safe daily quota is smaller than the selected Subscriber count. -
broadcast_high_volume_sends_paused: an administrator has temporarily blocked new high-volume starts. -
broadcast_production_approval_required: the workspace does not have a current production high-volume approval. Contact Mailrith support. -
broadcast_production_connection_not_approved: choose the delivery connection named in the workspace approval, or ask Mailrith support to review the new connection. -
broadcast_production_approval_expired: the workspace approval has expired. Ask Mailrith support to renew it with current evidence. -
broadcast_production_canary_limit_exceeded: the current Subscriber estimate is above the approved canary checkpoint. Reduce the selection or complete the next review. -
broadcast_connection_unavailable: the selected connection is disabled, deleted, unlinked, unsupported, or incomplete. -
broadcast_connection_unhealthy: Mailrith could not reach the provider during the connection check. -
broadcast_sender_unverified: the provider did not confirm the selected sending address or domain. -
broadcast_event_webhook_missing: provider delivery event tracking is not configured for this connection. -
broadcast_no_recipients: no active Subscribers match the saved selection. -
broadcast_not_sendable: the Broadcast is no longer in a state that can start a send. - A provider pause or quota wait during delivery appears in
pause_reasonandnext_retry_at. Continue polling; do not create another Broadcast send. - A
429response is an API request-rate limit. Wait forRetry-After; it is separate from the provider's email send rate.
Sending Safety
A broadcast send can contact real subscribers. Treat send permission as a high-impact permission when you design your integration.
For AI agents and workflow tools, keep draft creation separate from send approval. Let the tool prepare the draft, summarize the subscribers, and send a test. Then require a person or trusted approval rule before live sending.
When a send fails, keep the error code, Broadcast ID, and run ID in your logs. Do not retry live sends blindly. Reuse the same idempotency key when a response is lost, and never automatically retry an unknown delivery outcome.
- Confirm that the workspace key points to the intended workspace before creating or sending campaigns.
- Confirm that the subscribers or segment are correct before calling the live send endpoint.
- Send a test to a controlled reviewer address.
- Log the person, system, or rule that approved the live send in your own system.
Need Help Shipping an Integration?
Reach the Mailrith team if you need help planning a sync, validating a webhook flow, or troubleshooting a request.