Skip to content

API reference

Templates API

Reusable content with variables, drafts and published versions.

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 templates

GET/templates

Responses

List templates: 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/templates \
  -H "Authorization: Bearer $ISENT_API_KEY"

Create a template

POST/templates

Created as a draft; publish it to use it.

Body

A JSON object.

Create a template: body
NameTypeDescription
nameRequiredstring1 to 120 characters.
aliasstringMatches ^[a-z0-9][a-z0-9-]{0,62}$.
subjectstringAt most 998 characters.
fromstringNone
reply_tostringNone
htmlstringNone
textstringNone
variablesobject[]None
variables[].keyRequiredstringMatches ^[A-Za-z_][\w.-]*$.
variables[].typeRequired"string" | "number"None
variables[].fallbackstringNone

Responses

Create a template: responses
StatusMeaning
201Created.
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 a template

GET/templates/{id}

By id or alias.

Parameters

Retrieve a template: parameters
NameInTypeDescription
idRequiredpathstringNone

Responses

Retrieve a template: 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/templates/{id} \
  -H "Authorization: Bearer $ISENT_API_KEY"

Update a template

PATCH/templates/{id}

Changes the draft; the published version is unchanged until you publish.

Parameters

Update a template: parameters
NameInTypeDescription
idRequiredpathstringNone

Body

A JSON object.

Update a template: body
NameTypeDescription
namestring1 to 120 characters.
aliasstring | nullMatches ^[a-z0-9][a-z0-9-]{0,62}$.
subjectstringAt most 998 characters.
fromstring | nullNone
reply_tostring | nullNone
htmlstringNone
textstring | nullNone
variablesobject[]None
variables[].keyRequiredstringMatches ^[A-Za-z_][\w.-]*$.
variables[].typeRequired"string" | "number"None
variables[].fallbackstringNone

Responses

Update a template: 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).

Delete a template

DELETE/templates/{id}

Parameters

Delete a template: parameters
NameInTypeDescription
idRequiredpathstringNone

Responses

Delete a template: 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 DELETE https://isent.dev/api/v1/templates/{id} \
  -H "Authorization: Bearer $ISENT_API_KEY"

Publish a template

POST/templates/{id}/publish

Snapshots the draft as a new version that sends use.

Parameters

Publish a template: parameters
NameInTypeDescription
idRequiredpathstringNone

Responses

Publish a template: 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/templates/{id}/publish \
  -H "Authorization: Bearer $ISENT_API_KEY"