---
title: "Publish a transactional email draft"
method: POST
path: "/v1/transactional-emails/{transactionalId}/publish"
tags: ["Transactional emails"]
---

# Publish a transactional email draft

`POST /v1/transactional-emails/{transactionalId}/publish`

Publish the transactional email's current draft email message. The draft becomes the published version and the draft is cleared.

## Response `200`

Transactional email published.

- TransactionalResource
  - `id` string, required — The ID of the transactional email.
  - `name` string, required — The name of the transactional email.
  - `draftEmailMessageId` string, nullable, required — The ID of the draft email message. `null` if there is no draft version.
  - `publishedEmailMessageId` string, nullable, required — The ID of the published email message. `null` if there is no published version.
  - `transactionalGroupId` string, nullable, required — The ID of the group this transactional email belongs to.
  - `createdAt` string, date-time, required — ISO 8601 timestamp for when the transactional email was created.
  - `updatedAt` string, date-time, required — ISO 8601 timestamp for when the transactional email was last updated.
  - `dataVariables` string[], required — Data variable names used by the published email. Empty for unpublished transactional emails.

## Other responses

- `400` — Invalid `transactionalId`.
- `401` — Invalid API key or content API not enabled for this team.
- `404` — Transactional email not found.
- `405` — Wrong HTTP request method.
- `409` — No draft to publish.
- `422` — Draft failed validation, sending domain is not verified, or content was flagged as unsafe.

---

[API](https://skmtc.net/loops/apis/loops-openapi-spec.md) · [All operations](https://skmtc.net/loops/apis/loops-openapi-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loops/loops-openapi-spec/revisions/9cc087257f0d/schema)
