Publish template

Make the current draft the version that emails are sent with.

POSThttps://api.cresca.xyz/api/v1/templates/:id/publish

Requires a full-access key. Copies the current draft (HTML, text, subject, default sender, Reply-To and variables) into a new published version. Every email sent with the template from then on uses this version. Placeholders that are not declared yet are added as string variables without a fallback.

Path parameters

idstringrequired

The template id or alias.

Example

Request
curl -X POST 'https://api.cresca.xyz/api/v1/templates/password-reset/publish' \
  -H 'Authorization: Bearer cr_live_xxxxxxxxx'
Response 200
{
  "object": "template",
  "id": "6713b1f4c2a94e0012ab34cd",
  "version": 2
}