Skip to content

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

GET/emails

Newest first, without bodies.

Parameters

List sent emails: parameters
NameInTypeDescription
limitquerynumberItems per page, 1 to 100 (default 20).
afterquerystringReturn items after this id (the last id of the previous page).

Responses

List sent emails: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).
cURL
curl -X GET https://isent.dev/api/v1/emails \
  -H "Authorization: Bearer $ISENT_API_KEY"

Send an email

POST/emails

Sends now, or at scheduled_at. Suppressed recipients are skipped. Counts toward the monthly transactional quota. Attachments total at most 3 MB.

Parameters

Send an email: parameters
NameInTypeDescription
Idempotency-KeyheaderstringRetries with the same key within 24 hours return the first response.

Body

A JSON object.

Send an email: body
NameTypeDescription
fromstringSender, "Name <address@your-domain>". The domain must be verified.
toRequiredstring | string[]Up to 50 items.
ccstring | string[]Up to 50 items.
bccstring | string[]Up to 50 items.
reply_tostring | string[]Up to 50 items.
subjectstringAt most 998 characters.
htmlstringNone
textstringNone
tagsobject[]Up to 50 items.
tags[].nameRequiredstringNone
tags[].valueRequiredstringNone
headersmap of stringNone
attachmentsobject[]None
attachments[].filenameRequiredstring1 to 255 characters.
attachments[].contentRequiredstringBase64 file content.
attachments[].content_typestringNone
scheduled_atstringISO 8601, or "in 1 hour". Up to 30 days ahead.
templateobjectNone
template.idRequiredstringTemplate id or alias. Uses the published version.
template.variablesmap of string | number | boolean | nullNone

Responses

Send an email: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
409Conflict with the current state, or an idempotency key reused.
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).

Send a batch

POST/emails/batch

Up to 100 emails in one request, validated together: if one is invalid, none is sent. No attachments or scheduling.

Parameters

Send a batch: parameters
NameInTypeDescription
Idempotency-KeyheaderstringRetries with the same key within 24 hours return the first response.

Body

A JSON array of 1 to 100 objects, each with these fields.

Send a batch: body
NameTypeDescription
fromstringSender, "Name <address@your-domain>". The domain must be verified.
toRequiredstring | string[]Up to 50 items.
ccstring | string[]Up to 50 items.
bccstring | string[]Up to 50 items.
reply_tostring | string[]Up to 50 items.
subjectstringAt most 998 characters.
htmlstringNone
textstringNone
tagsobject[]Up to 50 items.
tags[].nameRequiredstringNone
tags[].valueRequiredstringNone
headersmap of stringNone
attachmentsobject[]None
attachments[].filenameRequiredstring1 to 255 characters.
attachments[].contentRequiredstringBase64 file content.
attachments[].content_typestringNone
scheduled_atstringISO 8601, or "in 1 hour". Up to 30 days ahead.
templateobjectNone
template.idRequiredstringTemplate id or alias. Uses the published version.
template.variablesmap of string | number | boolean | nullNone

Responses

Send a batch: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
409Conflict with the current state, or an idempotency key reused.
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).

Retrieve an email

GET/emails/{id}

With its delivery events.

Parameters

Retrieve an email: parameters
NameInTypeDescription
idRequiredpathstringNone

Responses

Retrieve an email: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
404Not found.
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).
cURL
curl -X GET https://isent.dev/api/v1/emails/{id} \
  -H "Authorization: Bearer $ISENT_API_KEY"

Reschedule an email

PATCH/emails/{id}

Parameters

Reschedule an email: parameters
NameInTypeDescription
idRequiredpathstringNone

Body

A JSON object.

Reschedule an email: body
NameTypeDescription
scheduled_atRequiredstringNone

Responses

Reschedule an email: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
404Not found.
409Conflict with the current state, or an idempotency key reused.
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).

Cancel a scheduled email

POST/emails/{id}/cancel

Adds a canceled event to the email. Cancels are not announced by webhook (there is no email.canceled event).

Parameters

Cancel a scheduled email: parameters
NameInTypeDescription
idRequiredpathstringNone

Responses

Cancel a scheduled email: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
404Not found.
409Conflict with the current state, or an idempotency key reused.
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).
cURL
curl -X POST https://isent.dev/api/v1/emails/{id}/cancel \
  -H "Authorization: Bearer $ISENT_API_KEY"