API reference
API overview
Base URL, authentication, errors, rate limits, idempotency, pagination and the rules every endpoint shares.
The isent API is a JSON API over HTTPS. This page covers what every endpoint shares; the reference pages in the sidebar list each endpoint. The same description is served as an OpenAPI 3 document at /api/openapi/json, for client generators and API tools.
Base URL
https://isent.dev/api/v1Send JSON bodies with Content-Type: application/json. Responses are JSON. Paths in these docs are relative to the base URL: POST /emails is POST https://isent.dev/api/v1/emails.
Authentication
Send an API key as a bearer token: Authorization: Bearer is_live_…. Full-access keys can call every endpoint; sending-access keys can only send email. See API keys.
Errors
Every error has the same body. name is stable: branch on it, not on message, which is written for people.
{
"statusCode": 422,
"name": "validation_error",
"message": "to needs at least one address."
}| Status | Name | When |
|---|---|---|
| 400 | validation_error | The body is not valid JSON. |
| 400 | invalid_idempotency_key | The Idempotency-Key header is empty or longer than 256 characters. |
| 401 | missing_api_key | No Authorization header. |
| 401 | invalid_api_key | The key is unknown or revoked. |
| 401 | restricted_api_key | A sending-access key called another endpoint. |
| 403 | restricted_api_key | A key limited to one domain sent from another. |
| 403 | invalid_from_address | The sender's domain is not in your team or not verified. |
| 403 | forbidden | A dashboard user's role cannot do this. |
| 403 | plan_limit_reached | Adding a domain, webhook endpoint, segment or contact past your plan. |
| 404 | not_found | The resource or route does not exist. |
| 409 | conflict | The request clashes with the resource's state, such as canceling an email that already went. |
| 409 | invalid_idempotent_request | An idempotency key reused with a different body. |
| 409 | concurrent_idempotent_requests | A request with the same idempotency key is still running. |
| 422 | validation_error | A field is missing or not valid. message names it. |
| 422 | invalid_attachment, invalid_scheduled_at, invalid_from_address | An attachment, schedule or sender is not valid. |
| 429 | rate_limit_exceeded | Too many requests. Wait for retry-after seconds. |
| 429 | monthly_quota_exceeded | The month's emails are used up. |
| 500 | internal_server_error | Something went wrong on our side. Retry with the same idempotency key. |
Rate limits
10 requests per second per API key on Free, Pro and Scale, which share one API rate limit. Enterprise limits are set in your contract, which can raise the limit for every key on the team. Every response says where you stand:
| Header | Value |
|---|---|
ratelimit-limit | Requests allowed each second: your contract's limit on Enterprise. |
ratelimit-remaining | Requests left in the current second. |
ratelimit-reset | Seconds until the count resets. |
retry-after | On a 429 only: seconds to wait. |
To send many emails, use POST /emails/batch (up to 100 per request) rather than many single calls. For higher limits, ask about Enterprise.
Quotas
- Emails you send and receive count toward your plan's monthly emails. Broadcasts do not: marketing plans are priced by contacts.
- Past the plan, paid plans with pay-as-you-go turned on keep sending, billed in buckets of 1,000 emails at the plan's rate. Otherwise sends answer
429 monthly_quota_exceededuntil the next month or an upgrade. - Domains, webhook endpoints, segments and contacts are counted per plan; adding past the plan answers
403 plan_limit_reached.
Idempotency
POST /emails, POST /emails/batch and POST /events accept an Idempotency-Key header: any string up to 256 characters that is unique to the action, such as welcome-user-123. For 24 hours, a retry with the same key and the same body returns the first response, with the header idempotent-replayed: true, and sends nothing again.
- The same key with a different body answers
409 invalid_idempotent_request. - A request that failed with an error releases its key, so you can retry it.
- Keys are per team, so two services must not share key names.
curl -X POST https://isent.dev/api/v1/emails \
-H "Authorization: Bearer $ISENT_API_KEY" \
-H "Idempotency-Key: welcome-user-123" \
-H "Content-Type: application/json" \
-d '{
"from": "Acme <hello@mail.acme.com>",
"to": "amira@acme.com",
"subject": "Welcome to Acme",
"text": "Thanks for signing up."
}'Pagination
List endpoints return the newest items first, 20 at a time. Pass limit (1 to 100) for more, and after with the last id you received for the next page. A page looks like this:
{
"object": "list",
"has_more": true,
"data": [
{
"object": "email",
"id": "em_7Hq2k9Wd"
},
{
"object": "email",
"id": "em_6Jr1m8Vc"
}
]
}Sending email
frommust be on a verified domain of your team, ashello@mail.acme.comorAcme <hello@mail.acme.com>.to,ccandbcctake an address or a list; together at most 50 addresses. Suppressed addresses are skipped; when nobody is left the email is stored assuppressedand not sent.- Give
html,text, or both, or atemplate(see Templates). reply_totakes an address or a list.
Batch
POST /emails/batch takes a JSON array of up to 100 emails, each shaped like a single send. They are validated together: if one is invalid, none is sent and the error says which (Email 3: …). Batch sends take no attachments and no scheduled_at. The response lists the new ids in order.
Attachments
attachments is a list of { filename, content, content_type }, with content in base64. Up to 20 files and 3 MB in total per email. content_type is worked out from the file name when you leave it out.
Scheduling
scheduled_at sends later: an ISO 8601 time such as 2026-12-01T09:00:00Z, or a phrase such as in 10 minutes, in 2 hours or in 1 day, up to 30 days ahead. Move it with PATCH /emails/{id} or cancel it with POST /emails/{id}/cancel while it is still scheduled.
Tags
tags is a list of { name, value } pairs, such as { "name": "category", "value": "receipt" }, that come back on the email and in its webhooks. Names and values use letters, digits, underscores and dashes; names starting with isent_ are reserved.
Headers
headers adds your own email headers, such as List-Unsubscribe or X-Entity-Ref-ID. Headers that come from the email's fields (From, To, Subject, Message-ID, Content-Type and the like) cannot be set this way.
Statuses
An email moves through queued or scheduled, then sent, delivered, opened and clicked, or ends as delivery_delayed, bounced, complained, suppressed, failed or canceled. GET /emails/{id} returns the status with every event and its time.
Reference
- EmailsSend, batch, schedule, retrieve, reschedule and cancel email.
- DomainsAdd sending domains, read their DNS records and verify them.
- API keysCreate, list and revoke keys for the API and SMTP.
- ContactsCreate and update contacts, their properties and topic subscriptions.
- SegmentsGroup contacts to send broadcasts to.
- TopicsSubscription topics contacts opt in to or out of.
- BroadcastsCreate, send, schedule and cancel marketing email.
- TemplatesReusable content with variables, drafts and published versions.
- EventsTell automations that something happened to a contact.
- WebhooksEndpoints, signing secrets, deliveries and replays.
- SuppressionsAddresses isent will not send to.