API Reference MillionSend v#0.2.0

Copy Markdown View Source

Modules

Official Elixir client for MillionSend — a self-hostable, Resend-compatible email API.

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.

A broadcast — an email sent to the team's contacts, optionally targeted.

A resolved MillionSend client: API key, base URL, User-Agent and the HTTP module to run requests through. Build one with MillionSend.client/1.

Contacts are team-global (one per email per team, case-insensitive) and addressable by id or email — email wins when both are given.

A contact. remove/2 populates contact (its id) plus deleted.

Send, fetch and cancel emails.

An email. send/2 and cancel/2 populate only id/object.

The error every non-2xx response carries, plus the client-side/transport case.

Behaviour for the swappable HTTP layer. The default is MillionSend.HTTP.Req; tests inject a stub by building a client with http_client: set to a module implementing this behaviour.

Default MillionSend.HTTP implementation, backed by Req.

The pagination envelope returned by list endpoints: data holds the cast structs, has_more says whether another page exists. Paginate with the after:/before: keyset cursors.

Dynamic segments — a saved filter over the team's contacts. A MillionSend extension with no Resend equivalent. get/2 returns a live contact_count.

A dynamic segment — a saved filter over the team's contacts.

Subscription topics.

A subscription topic — a granular unsubscribe category.