Skip to main content

API

The Epostix API sends transactional email, manages the domains you send from, and reports on what happened to each message. It is JSON over HTTPS with one bearer token.

Base URL​

https://api.epostix.com/v1

Every path is served under /v1. A request to a path without that prefix returns not_found, so if a first call comes back 404 that is the first thing to check.

A first request​

curl https://api.epostix.com/v1/emails \
-H "Authorization: Bearer $EPOSTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"from": "[email protected]",
"to": ["[email protected]"],
"subject": "It works",
"html": "<p>Sent from Epostix.</p>"
}'

The response is the created message, including the id you use to look it up later.

You can run this before verifying a domain by sending to a sandbox address, which is simulated end to end and costs nothing.

Authentication​

One header, on every request:

Authorization: Bearer tix_live_...

Keys carry permission scopes, may be restricted to particular domains, and always expire. See Authentication for what each scope grants, and API keys for creating them in the dashboard.

Every response​

Success returns the object you asked for. Failure returns the same envelope every time:

{
"status": 422,
"type": "invalid_schedule",
"message": "scheduled_at must be within 72 hours",
"request_id": "req_01J8K2P...",
"doc_url": "https://docs.epostix.com/errors/invalid_schedule"
}

Branch on type, never on message. The full catalogue is at Errors, and doc_url links straight to the page for whatever you just hit.

Lists​

List endpoints are cursor paginated. Pass limit and either starting_after or ending_before, then read has_more and next_cursor off the response.

{
"data": [],
"has_more": true,
"next_cursor": "b9c3..."
}

Never compute the next cursor yourself. Pass back the one you were given.

Where to go next​

If you want toRead
Send without touching productionTest mode
Make retries safeIdempotency
Understand a failureErrors
Know how hard you may pushRate limits
React to deliveries and bouncesWebhooks
Send from your own domainVerify a sending domain
Know what we promise not to breakVersioning