Developers
Build on Inspiremail
A REST API for everything your systems need from the platform — lists, suppressions, reports, events, journeys and transactional email — plus signed webhooks for every event.
The basics
- Base URL
- https://platform.inspiremail.io/v1
- Authentication
- Authorization: Bearer im_live_… — keys are created in Settings › API keys, belong to one organization and carry scopes.
- Pagination
- Cursor-based, newest first: limit ≤ 100, pass next_cursor as ?cursor= for the next page.
- Errors
- JSON { error: { code, message, param? } } with stable codes such as invalid_request, rate_limited, plan_limit.
- Rate limits
- 600 requests per minute per key; 300 messages per minute per key on POST /messages. 429 comes with Retry-After.
- Body limits
- 5 MB JSON bodies (15 MB for POST /messages); larger requests get 413 payload_too_large.
Transactional email
Send a message in one call
- Messages go through a stream bound to a verified identity at one of your providers.
-
Use a saved template with
variables(HTML-escaped) or inline html/text. - Attachments: up to 10 files, 5 MB each, 10 MB in total.
- Idempotency-Key: the same key and body within 24 h replays the original response; a different body returns 409.
- Transactional streams only block hard bounces and complaints; marketing streams apply every suppression and add List-Unsubscribe.
curl https://platform.inspiremail.io/v1/messages \
-H "Authorization: Bearer im_live_…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-receipt" \
-d '{
"from": "Receipts <receipts@example.com>",
"to": "customer@example.org",
"subject": "Your receipt",
"template_id": "tpl_receipt",
"variables": { "first_name": "Sara", "total": "420 DH" }
}' Scopes
Give each key only what it needs. Revoking a key also disables the REST hooks it created.
| Scope | Allows |
|---|---|
| lists:read | List subscriber lists and read a list. |
| lists:write | Remove contacts from a list. |
| contacts:write | Add up to 1,000 contacts per call to a list. |
| suppressions:read | List and search suppressions. |
| suppressions:write | Add (≤ 500 per call) and remove suppressions. |
| campaigns:read | List campaigns and read stats and drops. |
| reports:read | Report rows and totals by time, user, offer, network, list, integration, mailbox, geo, deliverability. |
| events:read | Activity feed: opens, clicks, conversions, unsubscribes, bounces, complaints. |
| messages:send | Send transactional email (POST /v1/messages). |
| messages:read | Message log and per-message event timeline. |
| hooks:write | Subscribe and unsubscribe REST hooks (Zapier, Make). |
| journeys:write | Enroll a contact into an API-triggered journey. |
Endpoints
- GET /v1/lists
- GET /v1/lists/{id}
- POST /v1/lists/{id}/contacts
- DELETE /v1/lists/{id}/contacts/{email}
- GET /v1/suppressions
- POST /v1/suppressions
- DELETE /v1/suppressions/{idOrValue}
- GET /v1/campaigns
- GET /v1/campaigns/{id}
- GET /v1/reports/{dimension}
- GET /v1/events
- POST /v1/messages
- GET /v1/messages
- GET /v1/messages/{id}
- GET /v1/hooks
- POST /v1/hooks
- DELETE /v1/hooks/{id}
- POST /v1/journeys/{id}/enroll
Full schemas, parameters and error codes: openapi.json (OpenAPI 3.1 — import it into Postman or generate a client).
Webhooks
Signed events, retried for you
Add endpoints in Settings › Webhooks. Each delivery is a JSON POST signed with HMAC-SHA256 and carries X-Inspiremail-Event and X-Inspiremail-Delivery (identical across retries — use it to de-duplicate).
- Failed deliveries are retried with backoff for about 22 hours. Redirects are not followed.
- After a secret rotation, both the new and previous secret sign for 24 hours — accept any matching v1.
- After 50+ failed deliveries in a row, an endpoint is disabled once nothing has succeeded for 24 hours (or an event runs out of retries), and an alert is raised.
- REST hooks: Zapier and Make subscribe with POST /v1/hooks and unsubscribe with DELETE /v1/hooks/{id}.
// X-Inspiremail-Signature: t=<unix>,v1=<hex>[,v1=<hex>]
import { createHmac, timingSafeEqual } from "node:crypto";
function verify(secret, header, rawBody) {
const parts = header.split(",").map((p) => p.split("="));
const t = parts.find(([k]) => k === "t")?.[1];
const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
return parts.some(([k, v]) => k === "v1" && v.length === expected.length &&
timingSafeEqual(Buffer.from(v), Buffer.from(expected)));
} Event types
- delivered
- bounced
- complained
- opened
- clicked
- converted
- unsubscribed
- campaign.completed
- message.sent
- message.delivered
- message.delayed
- message.bounced
- message.complained
- message.failed
- message.opened
- message.clicked
API questions?
Customers can reach support through the contact form (topic: Support). Found a security issue? See responsible disclosure.
Related guides
All guides-
Deliverability
Transactional email API: keys, streams, first send
Set up the Inspiremail transactional email API: create a scoped API key, a stream with a verified sender, and send your first receipt with safe retries.
Read the guide -
Deliverability
Email event webhooks: setup, signatures, retries
Send email event webhooks from Inspiremail to your app: add an HTTPS endpoint, pick events, verify the HMAC signature and see how retries and auto-disable work.
Read the guide -
Deliverability
Zapier and Make: connect Inspiremail with webhooks
Connect Zapier and Make to Inspiremail without a plugin: catch email events with a webhook trigger, add contacts with an HTTP action and a scoped API key.
Read the guide
Ready to run your next drop on Inspiremail?
Tell us about your volume, providers and networks — or apply directly and pick your plan during onboarding.
Already a customer? Sign in