# Publish email template API

> Publish email template API reference: POST /templates/:id/publish copies the current draft into a new published version, which every later send uses.

Canonical: https://www.cresca.xyz/docs/api-reference/publish-template
Last updated: 2026-11-05

Use the publish email template API to make the current draft the version that emails are sent with.

POST https://api.cresca.xyz/api/v1/templates/:id/publish

Requires a full-access key. Copies the current draft (HTML, text, subject, default sender, Reply-To, preview text and variables) into a new published version. The preview text is added to the published HTML. 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

id string required

The template id or alias.

## Publish email template API example

Request

```bash
curl -X POST 'https://api.cresca.xyz/api/v1/templates/password-reset/publish' \
  -H 'Authorization: Bearer cr_live_xxxxxxxxx'
```

Response 200

```json
{
  "object": "template",
  "id": "6713b1f4c2a94e0012ab34cd",
  "version": 2
}
```

[Previous Update template](https://www.cresca.xyz/docs/api-reference/update-template) [Next Delete template](https://www.cresca.xyz/docs/api-reference/delete-template)

Last updated November 5, 2026. Questions? [lalit@cresca.xyz](mailto:lalit@cresca.xyz)
