Broadcasts. Create a draft, then send/3 it (optionally scheduled).
Target with an optional segment_id and/or topic_id; neither means every
contact of the team.
{:ok, b} = MillionSend.Broadcasts.create(%{
from: "Acme <news@acme.dev>", subject: "Launch", html: "<p>hi</p>"
})
MillionSend.Broadcasts.send(b.id, scheduled_at: "2026-09-01T09:00:00Z")
Summary
Functions
POST /broadcasts/:id/cancel — scheduled only.
POST /broadcasts
GET /broadcasts/:id
GET /broadcasts — accepts limit:, after:, before:.
DELETE /broadcasts/:id — draft only.
POST /broadcasts/:id/send — pass scheduled_at: to schedule, omit to send now.
PATCH /broadcasts/:id — draft only.
Functions
@spec cancel(MillionSend.Client.t(), String.t()) :: {:ok, MillionSend.Broadcasts.Broadcast.t()} | {:error, MillionSend.Error.t()}
POST /broadcasts/:id/cancel — scheduled only.
@spec create(MillionSend.Client.t(), map()) :: {:ok, MillionSend.Broadcasts.Broadcast.t()} | {:error, MillionSend.Error.t()}
POST /broadcasts
@spec get(MillionSend.Client.t(), String.t()) :: {:ok, MillionSend.Broadcasts.Broadcast.t()} | {:error, MillionSend.Error.t()}
GET /broadcasts/:id
GET /broadcasts — accepts limit:, after:, before:.
@spec list(MillionSend.Client.t() | keyword()) :: {:ok, MillionSend.List.t()} | {:error, MillionSend.Error.t()}
@spec list( MillionSend.Client.t(), keyword() ) :: {:ok, MillionSend.List.t()} | {:error, MillionSend.Error.t()}
@spec remove(MillionSend.Client.t(), String.t()) :: {:ok, MillionSend.Broadcasts.Broadcast.t()} | {:error, MillionSend.Error.t()}
DELETE /broadcasts/:id — draft only.
@spec send(String.t()) :: {:ok, MillionSend.Broadcasts.Broadcast.t()} | {:error, MillionSend.Error.t()}
POST /broadcasts/:id/send — pass scheduled_at: to schedule, omit to send now.
@spec send(MillionSend.Client.t() | String.t(), String.t() | keyword()) :: {:ok, MillionSend.Broadcasts.Broadcast.t()} | {:error, MillionSend.Error.t()}
@spec send(MillionSend.Client.t(), String.t(), keyword()) :: {:ok, MillionSend.Broadcasts.Broadcast.t()} | {:error, MillionSend.Error.t()}
@spec update(MillionSend.Client.t(), String.t(), map()) :: {:ok, MillionSend.Broadcasts.Broadcast.t()} | {:error, MillionSend.Error.t()}
PATCH /broadcasts/:id — draft only.