Reference

Sending API

One endpoint sends any template you've published. Everything else — designing, publishing, keys and history — happens in the dashboard.

Send an email

POSThttps://notify-api.notils.com/v1/emails/send

Renders the template's published version with your variables and sends it to one recipient. Editing or saving a template never changes what this sends — only publishing does.

Authentication

Send your workspace API key as a bearer token. Keys start with ntl_, are created in Developers, and can only call this endpoint.

Header
Authorization: Bearer ntl_…

Request body

FieldTypeDescription
template_keystring, requiredThe template's key, e.g. welcome. 1–200 characters.
tostring, requiredThe recipient's email address.
variablesobjectA value for every variable the template's subject, preview text and body use. Values are strings, numbers or booleans.
Request
{
  "template_key": "password-reset",
  "to": "ram@example.com",
  "variables": { "name": "Ram", "code": "482913" }
}

Responses

StatusMeaningWhat to do
202Sent. Body: {"status": "sent"}Nothing — it's in Activity.
401The key is missing, malformed, or revokedCheck the header; create a new key if needed.
404No template with that key in this workspaceCheck the key spelling.
409The template exists but isn't publishedOpen it and choose Publish → Go live.
422A variable is missing or has the wrong type, or the address is invalidRead error.field_errors — it names the field.
5xxDelivery or service failureRetry with backoff. The attempt is logged in Activity.

A missing variable is refused, not guessed

If the template uses {{name}} and you don't send name, the request fails with 422 instead of sending an email with a blank or literal placeholder.

Error format

Every error has the same envelope. code is stable for branching; message is written for people; request_id matches the send in Activity and helps us trace a problem.

422 Unprocessable
{
  "error": {
    "code": "validation_failed",
    "message": "One or more fields are invalid.",
    "request_id": "01J9…",
    "field_errors": [
      { "field": "variables.code", "code": "required", "message": "Is required." }
    ]
  }
}
codeStatus
invalid_request400 — the body isn't valid JSON
unauthenticated401
forbidden403
not_found404
conflict409
validation_failed422 — see field_errors
unprocessable_entity422 — the template itself couldn't be rendered
internal500

Retries

Sending isn't idempotent yet: retrying a request that actually succeeded sends the email twice. Retry on network errors and 5xx responses, not on 4xx — those won't succeed without a change.