Get your API key
API reference

Broadcasts

One-to-many sends: draft a broadcast, edit it, and send it now or on a schedule.

Auth: Session token · Base URL: https://api.mailkite.dev

Endpoints

Each row expands to its request and response schema. The address bar follows along, so any endpoint can be linked to directly.

GET /api/broadcasts List your broadcasts (one-to-many sends) with status and send stats.

List your broadcasts (one-to-many sends) with status and send stats.

Response body

array broadcast.json

One broadcast (bct_…): content + audience + send state. Only drafts are editable; send() flips a draft to 'scheduled' or 'sending' and the per-recipient ledger tracks fan-out.

FieldTypeNotes
id req stringBroadcast id (bct_…).
user_id req stringOwning account (usr_…).
name req stringInternal name shown in the dashboard list.
from_addr req stringSender, on an outbound-verified domain you own. May carry a display name.
reply_tostring · nullReply-To address, when set.
subject req stringSubject line.
previewstring · nullInbox preview text (the snippet next to the subject).
audience req stringAudience selection as a JSON string: { "type": "all" | "list" | "filter", "id"?: … }.
template_idstring · nullTemplate the content comes from (tpl_… / base_…), when content isn't inline.
htmlstring · nullInline HTML body, when not using a template.
textstring · nullInline plain-text body, when not using a template.
footer_addressstring · nullPhysical postal address for the CAN-SPAM footer. Prefilled from the account when not set.
status req "draft" · "scheduled" · "sending" · "sent" · "canceled" · "failed"Send lifecycle state.
scheduled_atinteger · nullWhen a scheduled broadcast will send, in Unix epoch milliseconds (UTC); null when it has never happened.
audience_countinteger · nullSnapshot of the audience size taken at send/schedule time; null for drafts.
sent_count req integerRecipients sent so far.
fail_count req integerRecipients failed so far.
sent_atinteger · nullWhen sending completed, in Unix epoch milliseconds (UTC); null when it has never happened.
created_at req integerWhen the broadcast was created, in Unix epoch milliseconds (UTC).
updated_at req integerWhen the broadcast last changed, in Unix epoch milliseconds (UTC).
POST /api/broadcasts Create a broadcast draft. `from` is required; set `audience` to { type: "all" } or { type: "list", id: "lst_…" }. Returns the broadcast with its id (bct_…). Send it with sendBroadcast.

Create a broadcast draft. `from` is required; set `audience` to { type: "all" } or { type: "list", id: "lst_…" }. Returns the broadcast with its id (bct_…). Send it with sendBroadcast.

Request body

create-broadcast-request.json
FieldTypeNotes
namestring
from req string
replyTostring
subjectstring
previewstring
audienceobject
audience.type"all" · "list" · "filter"
audience.idstring
audience.querystring
templateIdstring
htmlstring
textstring
footerAddressstring

Response body

broadcast.json

One broadcast (bct_…): content + audience + send state. Only drafts are editable; send() flips a draft to 'scheduled' or 'sending' and the per-recipient ledger tracks fan-out.

FieldTypeNotes
id req stringBroadcast id (bct_…).
user_id req stringOwning account (usr_…).
name req stringInternal name shown in the dashboard list.
from_addr req stringSender, on an outbound-verified domain you own. May carry a display name.
reply_tostring · nullReply-To address, when set.
subject req stringSubject line.
previewstring · nullInbox preview text (the snippet next to the subject).
audience req stringAudience selection as a JSON string: { "type": "all" | "list" | "filter", "id"?: … }.
template_idstring · nullTemplate the content comes from (tpl_… / base_…), when content isn't inline.
htmlstring · nullInline HTML body, when not using a template.
textstring · nullInline plain-text body, when not using a template.
footer_addressstring · nullPhysical postal address for the CAN-SPAM footer. Prefilled from the account when not set.
status req "draft" · "scheduled" · "sending" · "sent" · "canceled" · "failed"Send lifecycle state.
scheduled_atinteger · nullWhen a scheduled broadcast will send, in Unix epoch milliseconds (UTC); null when it has never happened.
audience_countinteger · nullSnapshot of the audience size taken at send/schedule time; null for drafts.
sent_count req integerRecipients sent so far.
fail_count req integerRecipients failed so far.
sent_atinteger · nullWhen sending completed, in Unix epoch milliseconds (UTC); null when it has never happened.
created_at req integerWhen the broadcast was created, in Unix epoch milliseconds (UTC).
updated_at req integerWhen the broadcast last changed, in Unix epoch milliseconds (UTC).
GET /api/broadcasts/:id Get one broadcast with its status and recipient summary.

Get one broadcast with its status and recipient summary.

Response body

broadcast.json

One broadcast (bct_…): content + audience + send state. Only drafts are editable; send() flips a draft to 'scheduled' or 'sending' and the per-recipient ledger tracks fan-out.

FieldTypeNotes
id req stringBroadcast id (bct_…).
user_id req stringOwning account (usr_…).
name req stringInternal name shown in the dashboard list.
from_addr req stringSender, on an outbound-verified domain you own. May carry a display name.
reply_tostring · nullReply-To address, when set.
subject req stringSubject line.
previewstring · nullInbox preview text (the snippet next to the subject).
audience req stringAudience selection as a JSON string: { "type": "all" | "list" | "filter", "id"?: … }.
template_idstring · nullTemplate the content comes from (tpl_… / base_…), when content isn't inline.
htmlstring · nullInline HTML body, when not using a template.
textstring · nullInline plain-text body, when not using a template.
footer_addressstring · nullPhysical postal address for the CAN-SPAM footer. Prefilled from the account when not set.
status req "draft" · "scheduled" · "sending" · "sent" · "canceled" · "failed"Send lifecycle state.
scheduled_atinteger · nullWhen a scheduled broadcast will send, in Unix epoch milliseconds (UTC); null when it has never happened.
audience_countinteger · nullSnapshot of the audience size taken at send/schedule time; null for drafts.
sent_count req integerRecipients sent so far.
fail_count req integerRecipients failed so far.
sent_atinteger · nullWhen sending completed, in Unix epoch milliseconds (UTC); null when it has never happened.
created_at req integerWhen the broadcast was created, in Unix epoch milliseconds (UTC).
updated_at req integerWhen the broadcast last changed, in Unix epoch milliseconds (UTC).
PATCH /api/broadcasts/:id Edit a draft broadcast (any of from/subject/audience/html/… ). Drafts only.

Edit a draft broadcast (any of from/subject/audience/html/… ). Drafts only.

Request body

update-broadcast-request.json
FieldTypeNotes
namestring
fromstring
replyTostring
subjectstring
previewstring
audienceobject
audience.type"all" · "list" · "filter"
audience.idstring
audience.querystring
templateIdstring
htmlstring
textstring
footerAddressstring

Response body

broadcast.json

One broadcast (bct_…): content + audience + send state. Only drafts are editable; send() flips a draft to 'scheduled' or 'sending' and the per-recipient ledger tracks fan-out.

FieldTypeNotes
id req stringBroadcast id (bct_…).
user_id req stringOwning account (usr_…).
name req stringInternal name shown in the dashboard list.
from_addr req stringSender, on an outbound-verified domain you own. May carry a display name.
reply_tostring · nullReply-To address, when set.
subject req stringSubject line.
previewstring · nullInbox preview text (the snippet next to the subject).
audience req stringAudience selection as a JSON string: { "type": "all" | "list" | "filter", "id"?: … }.
template_idstring · nullTemplate the content comes from (tpl_… / base_…), when content isn't inline.
htmlstring · nullInline HTML body, when not using a template.
textstring · nullInline plain-text body, when not using a template.
footer_addressstring · nullPhysical postal address for the CAN-SPAM footer. Prefilled from the account when not set.
status req "draft" · "scheduled" · "sending" · "sent" · "canceled" · "failed"Send lifecycle state.
scheduled_atinteger · nullWhen a scheduled broadcast will send, in Unix epoch milliseconds (UTC); null when it has never happened.
audience_countinteger · nullSnapshot of the audience size taken at send/schedule time; null for drafts.
sent_count req integerRecipients sent so far.
fail_count req integerRecipients failed so far.
sent_atinteger · nullWhen sending completed, in Unix epoch milliseconds (UTC); null when it has never happened.
created_at req integerWhen the broadcast was created, in Unix epoch milliseconds (UTC).
updated_at req integerWhen the broadcast last changed, in Unix epoch milliseconds (UTC).
DELETE /api/broadcasts/:id Delete a broadcast draft.

Delete a broadcast draft.

Response body

ok-response.json

The uniform acknowledgement for deletes and other actions with nothing else to report.

FieldTypeNotes
ok req trueAlways true — a non-2xx error body is returned otherwise.
POST /api/broadcasts/:id/send Send a broadcast now, or pass an ISO 8601 `scheduledAt` to schedule it. A one-click unsubscribe is always added. Returns the status and resolved audience count.

Send a broadcast now, or pass an ISO 8601 `scheduledAt` to schedule it. A one-click unsubscribe is always added. Returns the status and resolved audience count.

Request body

send-broadcast-request.json
FieldTypeNotes
scheduledAtstring

Response body

send-broadcast-response.json

POST /api/broadcasts/:id/send — 202 with the broadcast's new state: 'scheduled' when a future scheduledAt was given, else 'sending' (fan-out continues in the background; poll GET /api/broadcasts/:id for progress).

FieldTypeNotes
id req stringThe broadcast (bct_…).
status req "scheduled" · "sending"State the broadcast moved to.
scheduledAtintegerWhen a scheduled broadcast will send. Present only when status is 'scheduled', in Unix epoch milliseconds (UTC).
audienceCount req integerAudience size snapshotted at this moment.