---
title: "Publish the draft as a new version"
method: POST
path: "/v1/email-templates/{idOrAlias}/publish"
tags: ["Email Templates"]
---

# Publish the draft as a new version

`POST /v1/email-templates/{idOrAlias}/publish`

## Request

- Base URL: `https://api.honkio.ca`
- URL: `https://api.honkio.ca/v1/email-templates/{idOrAlias}/publish`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Live sends use the new version at once. Live keys only (LIVE_KEY_REQUIRED): a send with a test key renders the draft and needs no publish.

Requires `email_templates:m`.

## Path parameters

- `idOrAlias` string, required

## Other responses

- `401`: Missing, invalid, revoked or expired API key.
- `402`: The account has no balance, or a LIVE key was used before the first top-up.
- `403`: LIVE_KEY_REQUIRED: templates have no test mode, and this changes what live sends get. A test key can create a template, edit its draft and send test emails that render the draft. Also FORBIDDEN when the key lacks the permission this operation requires, or the account is suspended or closed.
- `429`: Rate limit reached: 100 requests per second per account, or a route-specific limit (Retry-After set where one applies).
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/honkio/apis/honkio-api.md) · [All operations](https://skmtc.dev/honkio/apis/honkio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/honkio/apis/honkio-api/revisions/ce4ed3fe9691?raw)
