Notix
API reference

Templates.

Create and manage reusable email bodies, and send with one by passing its id. Every request needs an API key in the Authorization header; the reference overview covers keys, errors and rate limits.

List templates

GET/v1/templatesFull access key

List this team's templates, most recently changed first.

Query parameters
FieldTypeAbout
pagenumber

Default 1.

limitnumber

Default 50.

terminal
curl -X GET "https://app.usenotix.dev/api/v1/templates" \
  -H "Authorization: Bearer $NOTIX_API_KEY"

Responses

200List this team's templates, most recently changed first
200 response fields
FieldTypeAbout
idrequiredstring

Template ID

namerequiredstring

Template name

subjectrequiredstring

Subject line; may contain {{variables}}

typerequiredstring

TRANSACTIONAL or MARKETING. A marketing template carries an unsubscribe footer and is required to.

One of TRANSACTIONAL, MARKETING.

previewTextstring

The grey line after the subject in most inboxes

Can be null.

contentstring

The editor document, as JSON. Null for a template created from HTML.

Can be null.

htmlstring

The rendered body that is sent

Can be null.

createdAtstring

When the template was created

Can be null.

updatedAtstring

When the template was last changed

Can be null.

Create a template

POST/v1/templatesFull access key

Create a template from an editor document (content) or from finished HTML (html) - one or the other, not both. HTML is sanitised on the way in. A marketing template created with no body is given the default marketing body so that it carries an unsubscribe footer.

Request body (JSON)
FieldTypeAbout
namerequiredstring

At most 200 characters.

subjectrequiredstring
typestring

One of TRANSACTIONAL, MARKETING.

previewTextstring

At most 255 characters.

contentstring
htmlstring
terminal
curl -X POST "https://app.usenotix.dev/api/v1/templates" \
  -H "Authorization: Bearer $NOTIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Acme",
  "subject": "Your receipt for order 4471"
}'

Responses

200Create a template from an editor document or from HTML
200 response fields
FieldTypeAbout
idrequiredstring

Template ID

namerequiredstring

Template name

subjectrequiredstring

Subject line; may contain {{variables}}

typerequiredstring

TRANSACTIONAL or MARKETING. A marketing template carries an unsubscribe footer and is required to.

One of TRANSACTIONAL, MARKETING.

previewTextstring

The grey line after the subject in most inboxes

Can be null.

contentstring

The editor document, as JSON. Null for a template created from HTML.

Can be null.

htmlstring

The rendered body that is sent

Can be null.

createdAtstring

When the template was created

Can be null.

updatedAtstring

When the template was last changed

Can be null.

Retrieve a template

GET/v1/templates/{templateId}Full access key

Read one template by id.

Path parameters
FieldTypeAbout
templateIdrequiredstring
terminal
curl -X GET "https://app.usenotix.dev/api/v1/templates/<templateId>" \
  -H "Authorization: Bearer $NOTIX_API_KEY"

Responses

200One template
200 response fields
FieldTypeAbout
idrequiredstring

Template ID

namerequiredstring

Template name

subjectrequiredstring

Subject line; may contain {{variables}}

typerequiredstring

TRANSACTIONAL or MARKETING. A marketing template carries an unsubscribe footer and is required to.

One of TRANSACTIONAL, MARKETING.

previewTextstring

The grey line after the subject in most inboxes

Can be null.

contentstring

The editor document, as JSON. Null for a template created from HTML.

Can be null.

htmlstring

The rendered body that is sent

Can be null.

createdAtstring

When the template was created

Can be null.

updatedAtstring

When the template was last changed

Can be null.

Update a template

PATCH/v1/templates/{templateId}Full access key

Change a template. Fields left out are unchanged, and the stored body is rewritten only when content or html is sent - a rename on its own leaves the body alone.

Path parameters
FieldTypeAbout
templateIdrequiredstring
Request body (JSON)
FieldTypeAbout
namestring

At most 200 characters.

subjectstring
typestring

One of TRANSACTIONAL, MARKETING.

previewTextstring

At most 255 characters.

contentstring
htmlstring
terminal
curl -X PATCH "https://app.usenotix.dev/api/v1/templates/<templateId>" \
  -H "Authorization: Bearer $NOTIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Acme",
  "subject": "Your receipt for order 4471",
  "type": "TRANSACTIONAL",
  "previewText": "Thanks for your order.",
  "content": "string",
  "html": "<p>Thanks for your order.</p>"
}'

Responses

200Update a template. Fields left out are unchanged.
200 response fields
FieldTypeAbout
idrequiredstring

Template ID

namerequiredstring

Template name

subjectrequiredstring

Subject line; may contain {{variables}}

typerequiredstring

TRANSACTIONAL or MARKETING. A marketing template carries an unsubscribe footer and is required to.

One of TRANSACTIONAL, MARKETING.

previewTextstring

The grey line after the subject in most inboxes

Can be null.

contentstring

The editor document, as JSON. Null for a template created from HTML.

Can be null.

htmlstring

The rendered body that is sent

Can be null.

createdAtstring

When the template was created

Can be null.

updatedAtstring

When the template was last changed

Can be null.

Delete a template

DELETE/v1/templates/{templateId}Full access key

Delete a template. Emails already sent from it are unaffected.

Path parameters
FieldTypeAbout
templateIdrequiredstring
terminal
curl -X DELETE "https://app.usenotix.dev/api/v1/templates/<templateId>" \
  -H "Authorization: Bearer $NOTIX_API_KEY"

Responses

200Delete a template
200 response fields
FieldTypeAbout
idrequiredstring
successrequiredboolean
messagerequiredstring