API reference
Emails API
Send, batch, schedule, retrieve, reschedule and cancel email.
Paths are relative to https://isent.dev/api/v1. Every request needs an API key; see API overview for errors, rate limits and pagination.
List sent emails
/emails
Newest first, without bodies.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | number | Items per page, 1 to 100 (default 20). |
after | query | string | Return items after this id (the last id of the previous page). |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
curl -X GET https://isent.dev/api/v1/emails \
-H "Authorization: Bearer $ISENT_API_KEY"Send an email
/emails
Sends now, or at scheduled_at. Suppressed recipients are skipped. Counts toward the monthly transactional quota. Attachments total at most 3 MB.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Retries with the same key within 24 hours return the first response. |
Body
A JSON object.
| Name | Type | Description |
|---|---|---|
from | string | Sender, "Name <address@your-domain>". The domain must be verified. |
to | string | string[] | Up to 50 items. |
cc | string | string[] | Up to 50 items. |
bcc | string | string[] | Up to 50 items. |
reply_to | string | string[] | Up to 50 items. |
subject | string | At most 998 characters. |
html | string | None |
text | string | None |
tags | object[] | Up to 50 items. |
tags[].name | string | None |
tags[].value | string | None |
headers | map of string | None |
attachments | object[] | None |
attachments[].filename | string | 1 to 255 characters. |
attachments[].content | string | Base64 file content. |
attachments[].content_type | string | None |
scheduled_at | string | ISO 8601, or "in 1 hour". Up to 30 days ahead. |
template | object | None |
template.id | string | Template id or alias. Uses the published version. |
template.variables | map of string | number | boolean | null | None |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 409 | Conflict with the current state, or an idempotency key reused. |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
Send a batch
/emails/batch
Up to 100 emails in one request, validated together: if one is invalid, none is sent. No attachments or scheduling.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
Idempotency-Key | header | string | Retries with the same key within 24 hours return the first response. |
Body
A JSON array of 1 to 100 objects, each with these fields.
| Name | Type | Description |
|---|---|---|
from | string | Sender, "Name <address@your-domain>". The domain must be verified. |
to | string | string[] | Up to 50 items. |
cc | string | string[] | Up to 50 items. |
bcc | string | string[] | Up to 50 items. |
reply_to | string | string[] | Up to 50 items. |
subject | string | At most 998 characters. |
html | string | None |
text | string | None |
tags | object[] | Up to 50 items. |
tags[].name | string | None |
tags[].value | string | None |
headers | map of string | None |
attachments | object[] | None |
attachments[].filename | string | 1 to 255 characters. |
attachments[].content | string | Base64 file content. |
attachments[].content_type | string | None |
scheduled_at | string | ISO 8601, or "in 1 hour". Up to 30 days ahead. |
template | object | None |
template.id | string | Template id or alias. Uses the published version. |
template.variables | map of string | number | boolean | null | None |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 409 | Conflict with the current state, or an idempotency key reused. |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
Retrieve an email
/emails/{id}
With its delivery events.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | None |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 404 | Not found. |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
curl -X GET https://isent.dev/api/v1/emails/{id} \
-H "Authorization: Bearer $ISENT_API_KEY"Reschedule an email
/emails/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | None |
Body
A JSON object.
| Name | Type | Description |
|---|---|---|
scheduled_at | string | None |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 404 | Not found. |
| 409 | Conflict with the current state, or an idempotency key reused. |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
Cancel a scheduled email
/emails/{id}/cancel
Adds a canceled event to the email. Cancels are not announced by webhook (there is no email.canceled event).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | None |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 404 | Not found. |
| 409 | Conflict with the current state, or an idempotency key reused. |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
curl -X POST https://isent.dev/api/v1/emails/{id}/cancel \
-H "Authorization: Bearer $ISENT_API_KEY"