SendpositoryDocs
API reference

API reference

Every endpoint with its request shape, response shape and errors - one base URL, one bearer token, JSON both ways.

Updated

The REST API is one base URL, one bearer token and JSON in both directions. Every endpoint below documents its request body, its response and the errors it can return.

Base URL
https://api.sendpository.com/v1

Authenticate with the API key you created in the dashboard, as a bearer token on every request. Keep it on your server — a key in browser or mobile code is a key anyone can read.

curl https://api.sendpository.com/v1/emails \
  -H "Authorization: Bearer $SENDPOSITORY_API_KEY"

The endpoints

ResourceWhat it does
EmailsSend, batch, retrieve and cancel messages
InboundRead mail received at your own domain
DomainsAdd a sending domain and check its DNS
API keysCreate and revoke keys
WebhooksSubscribe to delivery, bounce and complaint events
LogsSearch what was sent and what happened to it

Conventions

Every error shares one shape, so a single handler covers all of them:

{ "error": { "type": "validation_error", "message": "..." } }

The type is stable and safe to branch on; the message is for humans and may change. Errors lists every type with the HTTP status it arrives with and what to do about it.

Writes accept an Idempotency-Key header. Retrying with the same key returns the original result instead of sending twice — see Idempotency.

On this page