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.
https://api.sendpository.com/v1Authenticate 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
| Resource | What it does |
|---|---|
| Emails | Send, batch, retrieve and cancel messages |
| Inbound | Read mail received at your own domain |
| Domains | Add a sending domain and check its DNS |
| API keys | Create and revoke keys |
| Webhooks | Subscribe to delivery, bounce and complaint events |
| Logs | Search 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.