Create a draft email broadcast. html is the send-ready body. Optional internalTemplate is visual-editor source; if set it must be paired with html and cannot be added later. Set audience to either a Mongo-style user filter (sync users via Users API first; for large lists) or a raw email list (max 10,000). Include name, from fields, subject, and HTML. Notification type is optional on create and required before send or schedule; it is created automatically if missing.
const url = 'https://api.pingram.io/broadcasts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","type":"example","channel":"email","audience":{"filter":{"additionalProperty":"example"},"emails":["example"]},"fromName":"example","fromAddress":"example","replyToAddress":"example","subject":"example","html":"example","internalTemplate":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.pingram.io/broadcasts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "type": "example", "channel": "email", "audience": { "filter": { "additionalProperty": "example" }, "emails": [ "example" ] }, "fromName": "example", "fromAddress": "example", "replyToAddress": "example", "subject": "example", "html": "example", "internalTemplate": "example" }'Authorizations
Request Bodyrequired
object
Notification type id. Optional on create; required before send/schedule. Created on the fly when missing.
Broadcast audience: exactly one of filter (Mongo-style query evaluated against synced user objects) or emails (raw list, max 10,000 addresses; for larger audiences use filter after syncing users via the Users API).
object
object
Optional visual-editor source. Can only be set at create time and must stay paired with html.
Responses
200
Successful response
Broadcast as returned by the API (html + optional internalTemplate on single-get only).
object
UUIDv7 (time-ordered).
Lifecycle status of an email broadcast.
Notification type id. Required before send or schedule.
Email-only in v1; forward-compatible field.
Broadcast audience: exactly one of filter (Mongo-style query evaluated against synced user objects) or emails (raw list, max 10,000 addresses; for larger audiences use filter after syncing users via the Users API).
object
object
Send-ready HTML body.
Optional visual-editor source. Can only be set at create time and must stay paired with html.
ISO datetime for scheduled broadcasts.
Set when the user archives the broadcast; hidden from the default list.
Example
{ "status": "draft", "pausedReason": "PAUSED_BY_USER", "channel": "email"}400
Bad Request - validation errors, invalid input
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}401
Unauthorized
402
Payment Required - usage limits exceeded
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}500
Internal Server Error
502
Bad Gateway - provider error
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}