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.
| Field | Type | About |
|---|---|---|
page | number | Default |
limit | number | Default |
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
| Field | Type | About |
|---|---|---|
idrequired | string | Template ID |
namerequired | string | Template name |
subjectrequired | string | Subject line; may contain {{variables}} |
typerequired | string | TRANSACTIONAL or MARKETING. A marketing template carries an unsubscribe footer and is required to. One of |
previewText | string | The grey line after the subject in most inboxes Can be null. |
content | string | The editor document, as JSON. Null for a template created from HTML. Can be null. |
html | string | The rendered body that is sent Can be null. |
createdAt | string | When the template was created Can be null. |
updatedAt | string | 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.
| Field | Type | About |
|---|---|---|
namerequired | string | At most 200 characters. |
subjectrequired | string | |
type | string | One of |
previewText | string | At most 255 characters. |
content | string | |
html | string |
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
| Field | Type | About |
|---|---|---|
idrequired | string | Template ID |
namerequired | string | Template name |
subjectrequired | string | Subject line; may contain {{variables}} |
typerequired | string | TRANSACTIONAL or MARKETING. A marketing template carries an unsubscribe footer and is required to. One of |
previewText | string | The grey line after the subject in most inboxes Can be null. |
content | string | The editor document, as JSON. Null for a template created from HTML. Can be null. |
html | string | The rendered body that is sent Can be null. |
createdAt | string | When the template was created Can be null. |
updatedAt | string | When the template was last changed Can be null. |
Retrieve a template
GET/v1/templates/{templateId}Full access key
Read one template by id.
| Field | Type | About |
|---|---|---|
templateIdrequired | string |
curl -X GET "https://app.usenotix.dev/api/v1/templates/<templateId>" \
-H "Authorization: Bearer $NOTIX_API_KEY"
Responses
200One template
| Field | Type | About |
|---|---|---|
idrequired | string | Template ID |
namerequired | string | Template name |
subjectrequired | string | Subject line; may contain {{variables}} |
typerequired | string | TRANSACTIONAL or MARKETING. A marketing template carries an unsubscribe footer and is required to. One of |
previewText | string | The grey line after the subject in most inboxes Can be null. |
content | string | The editor document, as JSON. Null for a template created from HTML. Can be null. |
html | string | The rendered body that is sent Can be null. |
createdAt | string | When the template was created Can be null. |
updatedAt | string | 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.
| Field | Type | About |
|---|---|---|
templateIdrequired | string |
| Field | Type | About |
|---|---|---|
name | string | At most 200 characters. |
subject | string | |
type | string | One of |
previewText | string | At most 255 characters. |
content | string | |
html | string |
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.
| Field | Type | About |
|---|---|---|
idrequired | string | Template ID |
namerequired | string | Template name |
subjectrequired | string | Subject line; may contain {{variables}} |
typerequired | string | TRANSACTIONAL or MARKETING. A marketing template carries an unsubscribe footer and is required to. One of |
previewText | string | The grey line after the subject in most inboxes Can be null. |
content | string | The editor document, as JSON. Null for a template created from HTML. Can be null. |
html | string | The rendered body that is sent Can be null. |
createdAt | string | When the template was created Can be null. |
updatedAt | string | 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.
| Field | Type | About |
|---|---|---|
templateIdrequired | string |
curl -X DELETE "https://app.usenotix.dev/api/v1/templates/<templateId>" \
-H "Authorization: Bearer $NOTIX_API_KEY"
Responses
200Delete a template
| Field | Type | About |
|---|---|---|
idrequired | string | |
successrequired | boolean | |
messagerequired | string |