Templates

Update template

Update the fields you send; omitted fields keep their value. Empty html or text values are ignored, so a body cannot be cleared. Each update increments version.

PATCHhttps://api.sndr.sh/v1/templates/{id}
Update template
curl -X PATCH 'https://api.sndr.sh/v1/templates/tpl_c19e5d34-82a' \
  -H "Authorization: Bearer $SNDR_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"subject": "Order #{{ order_id }} has shipped"}'
200OK
{
  "id":              "tpl_c19e5d34-82a",
  "organization_id": "org_8d41c7a2-3f6",
  "name":            "Order confirmation",
  "subject":         "Order #{{ order_id }} has shipped",
  "html":            "<h1>Hi {{ first_name }},</h1><p>Order #{{ order_id }} confirmed.</p>",
  "text":            "Hi {{ first_name }}, order #{{ order_id }} confirmed.",
  "version":         4,
  "created_at":      "2026-02-10T14:00:00Z",
  "updated_at":      "2026-06-01T12:00:00Z"
}

Authorization

Authorizationstringheaderrequired

Bearer followed by your API key. Needs the send scope.

Path parameters

idstringrequired

Template ID (tpl_...).

Body

application/json
namestring

New internal name, 1–200 characters.

subjectstring

New subject line, max 998 characters.

htmlstring

New HTML body (sanitized on save).

textstring

New plain-text body.

Errors

401unauthenticatedMissing or invalid API key.
400invalid_requestBody is not valid JSON, has an unknown field, or a field has the wrong type.
403insufficient_scopeThe API key is missing the send scope.
404not_foundResource does not exist or belongs to a different account.
422validation_failedname or subject is empty or too long.