The whole API in three facts. Base URL is
https://api.drin.run. Authenticate with Authorization: Bearer $DRIN_API_KEY. Send and read JSON. That’s the entire integration surface.Send an email
The same request in three stacks. Each posts to/v1/emails and gets back { "id": "…" } on 202 Accepted.
Prefer Python? A first-party
drin package is on PyPI — pip install drin. Or keep calling the REST API directly with the requests snippet above; it stays valid forever, since it’s just HTTP.Naming the project
A project-scoped key already knows which project it belongs to — send with just theAuthorization header. An account-wide key spans every project, so you name the sender per request with X-Drin-Product:
cURL
X-Drin-Product is the canonical header; X-Drin-Sender is an accepted alias. See Authentication for the full picture and API keys for scoping.
Pagination
List endpoints are cursor-paged: each response carries{ data, nextCursor }. Pass cursor=$nextCursor until nextCursor comes back null. Here’s the loop in shell with jq:
limit bounds (1–100).
Errors & retries
Non-2xx responses share one JSON envelope —{ "error": { "type", "message", "param?" } } — and echo a request id in X-Request-Id. On 429, honour the Retry-After header before retrying; retry 5xx idempotently by sending an Idempotency-Key. The full table lives in Errors.
Beyond HTTP
CLI
npx @drin00/cli — send and inspect from a terminal or CI, no code at all.MCP server
npx @drin00/mcp — give an AI agent the full API as tools.SMTP
Point any existing library at Drin’s SMTP gateway instead of REST.
