API Reference MillionSend v#0.1.0

Copy Markdown View Source

Modules

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

Audiences — named contact lists. Resend-compatible, so a migrating app's audiences.* calls port straight over. (MillionSend's dynamic-filter MillionSend.Segments are a separate, richer resource.)

A named contact list.

Broadcasts. Create a draft, then send/3 it (optionally scheduled).

A broadcast — an email sent to an audience or segment.

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, addressable by id or email — email wins when both are given. Pass :audience_id to scope a call to an audience; omit it for the top-level contact routes.

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 an audience's contacts. A MillionSend extension with no Resend equivalent; the wire path is /segments2. get/2 returns a live contact_count.

A dynamic segment — a saved filter over an audience's contacts.

Subscription topics.

A subscription topic — a granular unsubscribe category.