Skip to Content
Docs
API referenceTemplates

Update a template's name, description, or variables

PATCH
/v1/templates/{alias}

Renames, re-describes, or changes the variable contract of a template. The alias is immutable — live integrations send against it. Omitted fields keep their current values.

Authorization

bearerAuth
headerAuthorizationBearer <token>

API key sent as Authorization: Bearer <key>. Looked up by SHA-256 hash (email_core::sha256_hex) against api_keys.hash; revoked keys and keys belonging to a suspended tenant are rejected. See the top-level Authentication section for permission levels.

Path Parameters

alias*string

Request Body

application/json
  1. body
name?string

Must not be blank when present.

description?string
variables?array<>
sample?unknown

Model previewTemplate uses when it is given none.

strict_vars?boolean

When true, a send missing a required variable is rejected.

Response Body

The updated template.

application/json
  1. response
template?
variables?array<>
Example Request
curl -X PATCH 'https://api.emitd.com/v1/templates/string' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "template": {    "id": "string",    "alias": "string",    "name": "string",    "created_at": 0,    "updated_at": 0  },  "variables": [    {      "name": "string",      "type": "text",      "required": true,      "sample": "string",      "description": "string"    }  ]}