# MillionSend v0.3.0 - Table of Contents

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

## Modules

- [MillionSend](MillionSend.md): Official Elixir client for [MillionSend](https://github.com/MillionSend/millionsend) —
a self-hostable, Resend-compatible email API.
- [MillionSend.Broadcasts](MillionSend.Broadcasts.md): 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.
- [MillionSend.Broadcasts.Broadcast](MillionSend.Broadcasts.Broadcast.md): A broadcast — an email sent to the team's contacts, optionally targeted.
- [MillionSend.Client](MillionSend.Client.md): A resolved MillionSend client: API key, base URL, User-Agent and the HTTP
module to run requests through. Build one with `MillionSend.client/1`.

- [MillionSend.Contacts](MillionSend.Contacts.md): Contacts are team-global (one per email per team, case-insensitive) and
addressable by id **or** email — email wins when both are given.
- [MillionSend.Contacts.Contact](MillionSend.Contacts.Contact.md): A contact. `remove/2` populates `contact` (its id) plus `deleted`.
- [MillionSend.Deliverability](MillionSend.Deliverability.md): Account-level deliverability score over the trailing window.
- [MillionSend.Emails](MillionSend.Emails.md): Send, fetch and cancel emails.
- [MillionSend.Emails.Email](MillionSend.Emails.Email.md): An email. `send/2` and `cancel/2` populate only `id`/`object`.
- [MillionSend.Emails.Insights](MillionSend.Emails.Insights.md): The pre-send best-practice report computed when an email was sent. `score`
is 0–10 (one decimal); `band` is a plain string
(`"excellent" | "good" | "needs_attention" | "at_risk"`, open to future values).

- [MillionSend.Emails.Insights.Check](MillionSend.Emails.Insights.Check.md): One best-practice check from an insights report. `id` is an open set (the
catalog grows across score versions), and `severity`/`status` are plain
strings so future wire values never break decoding. `detail` is free-form
JSON (a map) or `nil`.

- [MillionSend.HTTP](MillionSend.HTTP.md): 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.

- [MillionSend.HTTP.Req](MillionSend.HTTP.Req.md): Default `MillionSend.HTTP` implementation, backed by Req.
- [MillionSend.List](MillionSend.List.md): 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.

- [MillionSend.Segments](MillionSend.Segments.md): Dynamic segments — a saved filter over the team's contacts. A MillionSend
extension with no Resend equivalent. `get/2` returns a live `contact_count`.
- [MillionSend.Segments.Segment](MillionSend.Segments.Segment.md): A dynamic segment — a saved filter over the team's contacts.
- [MillionSend.Topics](MillionSend.Topics.md): Subscription topics.
- [MillionSend.Topics.Topic](MillionSend.Topics.Topic.md): A subscription topic — a granular unsubscribe category.

- Exceptions
  - [MillionSend.Error](MillionSend.Error.md): The error every non-2xx response carries, plus the client-side/transport case.

