Templates
Templates API
5 endpoints under https://api.mailneo.co/api/v2. Every request carries your key in the x-api-key header.
Scopes used on this page: templates:read, templates:write. Each endpoint below states the one it requires. Start with the quickstart →
/templatesList templates
Requires templates:read
Cursor-paginated. Pass updated_since with the synced_through value from your previous run to fetch only what changed; you will occasionally re-see a row, so upsert by id. Deletes are not visible to updated_since. The template body is not included here — fetch a single template to get it.
Query parameters7
limitintegerdefault: 251..100cursorstring≤ 256 charsnext_cursor. Treat it as a black box: cursors are bound to the sort they were issued under and are validated strictly, so a hand-crafted, modified or foreign cursor — including any cursor issued before the 2026-08 format revision — answers 400 cursor_invalid. On that error, restart from the first page.order"asc" | "desc"default: descupdated_sincestring · date-timesort"updated_at" | "created_at"default: updated_atcategorystring≤ 50 charssearchstring≤ 200 charscurl "https://api.mailneo.co/api/v2/templates?limit=25&order=desc&sort=updated_at" \
-H "x-api-key: $MAILNEO_API_KEY"{
"data": [
{
"object": "template",
"id": "c0c9y51n0bzyjco0ctxcfl0cj",
"name": "Welcome email",
"description": "Created via the API.",
"subject": "April product notes",
"category": "…",
"created_at": "2026-05-11T09:30:00.000Z",
"updated_at": "2026-06-24T15:45:00.000Z"
}
],
"meta": {
"request_id": "6a269ce8-6b26-4e7b-ac26-a00e6d26a1a1",
"has_more": false,
"next_cursor": null,
"synced_through": "2026-06-24T15:45:00.000Z"
}
}/templatesCreate a template
Requires templates:write · Idempotency-Key optional
Creates one template. name must be unique within the team — a duplicate is a 409 resource_already_exists, not a silent second copy. Templates are private to the team that owns them; there is no way to publish one, and no request field controls visibility.
Query parameters1
dry_runbooleandata: null and a meta.impact block. Requires the resource's :read scope in addition to the scope this endpoint declares. Must be exactly true or false.Header parameters1
Idempotency-Keystring≤ 255 charsIdempotent-Replayed: true. Reusing a key with a different body is a 409 idempotency_key_reused. Keys are remembered for 24 hours.Body parameters5
namestringrequired1..100 charssubjectstringrequired1..200 charsbodystringrequired1..524288 charsdescriptionstring · nullable≤ 500 charscategorystring · nullable≤ 50 charscurl -X POST "https://api.mailneo.co/api/v2/templates" \
-H "x-api-key: $MAILNEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Ada Lovelace",
"subject": "April product notes",
"body": "<p>Hi {{first_name}},</p>",
"description": "Created via the API.",
"category": "…"
}'{
"data": "…",
"meta": {
"request_id": "aac7b41d-a9c7-428a-a8c7-b0f7a7c7af64",
"dry_run": false
}
}/templates/{templateId}Retrieve a template
Requires templates:read
Returns the full template, including the body omitted from the list response.
Path parameters1
templateIdstringrequired1..64 charscurl "https://api.mailneo.co/api/v2/templates/{templateId}" \
-H "x-api-key: $MAILNEO_API_KEY"{
"data": {
"object": "template",
"id": "c0c9y51n0bzyjco0ctxcfl0cj",
"name": "Welcome email",
"description": "Created via the API.",
"subject": "April product notes",
"category": "…",
"created_at": "2026-05-11T09:30:00.000Z",
"updated_at": "2026-06-24T15:45:00.000Z",
"body": "<p>Hi {{first_name}},</p>"
},
"meta": {
"request_id": "66d3e185-65d3-4ff2-a4d3-de5f63d3dccc"
}
}/templates/{templateId}Update a template
Requires templates:write · Idempotency-Key optional
Merge-patch: fields you omit are left alone, and null clears description or category. name, subject and body cannot be cleared — they are required columns — so sending null for one is a 400. Renaming to a name another template in the team already uses is a 409.
Path parameters1
templateIdstringrequired1..64 charsQuery parameters1
dry_runbooleandata: null and a meta.impact block. Requires the resource's :read scope in addition to the scope this endpoint declares. Must be exactly true or false.Header parameters1
Idempotency-Keystring≤ 255 charsIdempotent-Replayed: true. Reusing a key with a different body is a 409 idempotency_key_reused. Keys are remembered for 24 hours.Body parameters5
namestring1..100 charssubjectstring1..200 charsbodystring1..524288 charsdescriptionstring · nullable≤ 500 charscategorystring · nullable≤ 50 charscurl -X PATCH "https://api.mailneo.co/api/v2/templates/{templateId}" \
-H "x-api-key: $MAILNEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Ada Lovelace",
"subject": "April product notes",
"body": "<p>Hi {{first_name}},</p>",
"description": "Created via the API.",
"category": "…"
}'{
"data": "…",
"meta": {
"request_id": "5f0ecd2c-600e-4ebf-a10e-d052620ed1e5",
"dry_run": false
}
}/templates/{templateId}Delete a template
Requires templates:write
Permanent, and there is no undo — call with ?dry_run=true first. Campaign steps that were built from this template keep their own copy of the subject and body and are unaffected. An automation "send email" step that references the template by id is NOT protected by a foreign key: deleting the template leaves that step with a dangling reference, and it will fail when the automation next runs. Check your automations before deleting a template they use.
Path parameters1
templateIdstringrequired1..64 charsQuery parameters1
dry_runbooleandata: null and a meta.impact block. Requires the resource's :read scope in addition to the scope this endpoint declares. Must be exactly true or false.curl -X DELETE "https://api.mailneo.co/api/v2/templates/{templateId}" \
-H "x-api-key: $MAILNEO_API_KEY"{
"data": {
"object": "template",
"id": "c0c9y51n0bzyjco0ctxcfl0cj",
"deleted": true
},
"meta": {
"request_id": "68b42f52-69b4-40e5-a6b4-2c2c67b42dbf",
"dry_run": false
}
}