API referenceTemplates
Create a new template version
POST
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. A key with guardrails may only save drafts (activate: false); activating responds 403 policy_violation, policy_template_activation_not_allowed.
bearerAuthheader
AuthorizationBearer <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.
alias*stringapplication/json- body
subject*stringhtml_body?stringtext_body?stringactivate?booleanDefault
trueVersion created.
application/json- response
version?integer1-based, monotonically increasing per template.
active?booleancurl -X POST 'https://api.emitd.com/v1/templates/string/versions' \ -H 'Content-Type: application/json' \ -d '{ "subject": "string"}'Example Response
{ "version": 0, "active": true}