---
title: "Make a template transactional"
method: POST
path: "/api/projects/{project_id}/messaging_templates/{id}/make_transactional/"
tags: ["messaging_templates"]
---

# Make a template transactional

`POST /api/projects/{project_id}/messaging_templates/{id}/make_transactional/`

## Request

- Base URL: `https://us.posthog.com`
- URL: `https://us.posthog.com/api/projects/{project_id}/messaging_templates/{id}/make_transactional/`
- Auth: HTTP bearer

Make this template sendable over the transactional email API. This creates the workflow that sends it, with its own metrics, run history and versions. This can't be undone: the template stays transactional. Transactional sends ignore marketing opt-outs. Calling it again on a transactional template changes nothing.

## Path parameters

- `id` string, uuid, required
- `project_id` string, required

## Request body

- MakeTransactional
  - `from_integration_id` integer, nullable: ID of the verified email sender integration the email is sent from. Defaults to the project's default sender.

## Response `200`

The transactional template

- MessageTemplate
  - `id` string, uuid, required
  - `name` string, required: Human-readable template name shown in the library.
  - `description` string: What the template is for and when to use it.
  - `tags` string[]: Tags for organizing templates, for example by team or use case. Tags are shared with the rest of the project. Omit to keep the current tags, send an empty list to remove them all.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `content` MessageTemplateContent
    - `templating` 'liquid': * `liquid` - liquid
    - `email` EmailTemplate
      - `subject` string: Email subject line. Supports Liquid templating. Required in `content` for email-type templates. A `draft_content` may leave it blank until it is published.
      - `text` string: Plain-text fallback body for clients that can't render the email.
      - `preheader` string: Preview text that most inboxes show after the subject. Supports Liquid templating.
      - `html` string: Rendered email body — derived from the design at save time. The visual editor's save path supplies it directly; omit it otherwise.
      - `design` object: Design JSON for PostHog's visual email editor — the authoring surface and source of truth. The server renders the sent email from it, and it opens as editable blocks in the editor. Full schema in the designing-email-templates skill.
        - `counters` object: Highest htmlID suffix per element type, e.g. {"u_row": 1, "u_content_text": 2}.
        - `schemaVersion` integer, required: Design schema version, e.g. 16.
        - `body` object, required
          - `id` string: Any unique string.
          - `rows` object[], required: Rows of {id, cells, columns[{id, contents[{id, type, values}], values}], values}.
          - `headers` object[]
          - `footers` object[]
          - `values` object: Body-level settings: backgroundColor, contentWidth ('600px'), fontFamily, textColor.
      - `from` EmailTemplateSender
        - `email` string: Address to send from instead of the sender's own. Must be on the sender's verified domain. Supports Liquid templating. Leave out or empty to use the sender's address.
        - `name` string: Sender name shown in the inbox instead of the sender's own. Supports Liquid templating. Leave out or empty to use the sender's name.
        - `integrationId` integer, required: ID of the project's email sender integration that sends this email. Transactional sends need a verified sender.
      - `replyTo` string: Reply-to address for a transactional template. Separate several addresses with commas. Supports Liquid templating. Leave empty to use the sender's default reply-to.
  - `created_by` UserBasic, required
    - `id` integer, required
    - `uuid` string, uuid, required
    - `distinct_id` string, nullable
    - `first_name` string
    - `last_name` string
    - `email` string, email, required
    - `is_email_verified` boolean, nullable
    - `hedgehog_config` object, nullable, required
    - `role_at_organization` union
      - 'engineering' | 'data' | 'product' | 'founder' | 'leadership' | 'marketing' | 'sales' | 'student' | 'other': * `engineering` - Engineering * `data` - Data * `product` - Product Management * `founder` - Founder * `leadership` - Leadership * `marketing` - Marketing * `sales` - Sales / Success * `student` - Student * `other` - Other
      - ''
      - unknown
  - `type` string: Message channel of the template. Currently 'email'.
  - `message_category` string, uuid, nullable: Message category ID to file the template under. Must belong to the same project.
  - `deleted` boolean: Soft-delete flag. Set true to remove the template from the library.
  - `sensitive` boolean: For emails that carry login codes, reset links or other secrets. PostHog keeps no copy of each sent email's body or filled-in subject, and clicked links keep only the site address. Can change at any time.
  - `transactional_hog_flow_id` string, uuid, nullable, required: The workflow that sends this template over the transactional email API. Null until the template is made transactional. Each content save writes a new version of it.
  - `draft_content` MessageTemplateContent
    - `templating` 'liquid': * `liquid` - liquid
    - `email` EmailTemplate
      - `subject` string: Email subject line. Supports Liquid templating. Required in `content` for email-type templates. A `draft_content` may leave it blank until it is published.
      - `text` string: Plain-text fallback body for clients that can't render the email.
      - `preheader` string: Preview text that most inboxes show after the subject. Supports Liquid templating.
      - `html` string: Rendered email body — derived from the design at save time. The visual editor's save path supplies it directly; omit it otherwise.
      - `design` object: Design JSON for PostHog's visual email editor — the authoring surface and source of truth. The server renders the sent email from it, and it opens as editable blocks in the editor. Full schema in the designing-email-templates skill.
        - `counters` object: Highest htmlID suffix per element type, e.g. {"u_row": 1, "u_content_text": 2}.
        - `schemaVersion` integer, required: Design schema version, e.g. 16.
        - `body` object, required
          - `id` string: Any unique string.
          - `rows` object[], required: Rows of {id, cells, columns[{id, contents[{id, type, values}], values}], values}.
          - `headers` object[]
          - `footers` object[]
          - `values` object: Body-level settings: backgroundColor, contentWidth ('600px'), fontFamily, textColor.
      - `from` EmailTemplateSender
        - `email` string: Address to send from instead of the sender's own. Must be on the sender's verified domain. Supports Liquid templating. Leave out or empty to use the sender's address.
        - `name` string: Sender name shown in the inbox instead of the sender's own. Supports Liquid templating. Leave out or empty to use the sender's name.
        - `integrationId` integer, required: ID of the project's email sender integration that sends this email. Transactional sends need a verified sender.
      - `replyTo` string: Reply-to address for a transactional template. Separate several addresses with commas. Supports Liquid templating. Leave empty to use the sender's default reply-to.

## Other responses

- `400`: The template can't be sent, or there is no verified sender
- `404`: Template not found

## Changes

> 53 revisions in range; 1 not diffed.

- **2026-10-21** `93118db75a02`: 1 info
  - added the optional property `tags` to the response with the `200` status
- **2026-10-21** `4e2cb03c322d`: 1 info
  - added the optional property `sensitive` to the response with the `200` status
- **2026-10-20** `36a10d3ce7cd`: 2 info
  - added the optional property `content/allOf[#/components/schemas/MessageTemplateContent]/email/oneOf[#/components/schemas/EmailTemplate]/preheader` to the response with the `200` status
  - added the optional property `draft_content/oneOf[#/components/schemas/MessageTemplateContent]/email/oneOf[#/components/schemas/EmailTemplate]/preheader` to the response with the `200` status
- **2026-10-19** `9cd0bb592622`: 1 info
  - added the optional property `draft_content` to the response with the `200` status
- **2026-10-16** `405eae87d089`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/posthog/apis/posthog-api/changes/api/projects/:project_id/messaging_templates/:id/make_transactional/post.md)

---

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