API referenceTemplates

Create a new template version

POST
/v1/templates/{alias}/versions

Each call creates a new immutable version. When activate (default true), every other version is deactivated first — POST /v1/email's template_alias rendering always uses the single active version.

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
subject*string
html_body?string
text_body?string
activate?boolean
Defaulttrue

Response Body

Version created.

application/json
  1. response
version?integer

1-based, monotonically increasing per template.

active?boolean
curl -X POST "https://example.com/v1/templates/string/versions" \  -H "Content-Type: application/json" \  -d '{    "subject": "string"  }'
{  "version": 0,  "active": true}