Transactional

Create transactional email

Changed on

Creates a saved transactional email template from exactly one of prompt, HTML, or Sequenzy blocks. Prompt-created templates default to disabled.

post/transactional

Request

  • Base URL
    https://api.sequenzy.com/api/v1
  • URL
    https://api.sequenzy.com/api/v1/transactional
  • Auth
    HTTP bearer

Request body

htmlstring

Raw HTML body. Provide either html or blocks, not both.

labelsstring[]

Company label names. Trimmed and deduplicated; missing names are created. Replaces all assignments; [] clears them. Omit to preserve assignments on update or start without labels on create. Null and blank names are rejected.

namestring required
slugstring

Optional API slug used when sending by slug. If omitted, one is generated from the name.

subjectstring

Required with HTML or blocks; optional with prompt, where it overrides the generated subject.

previewTextstring nullable
promptstring

Natural-language request for branded transactional blocks.

stylestring

Generation style; valid only with prompt. Pass designed or plain to force the designed or plain-text email style; other values are freeform prompt guidance. Defaults to the company's email style preference.

tonestring

Generation tone; valid only with prompt.

enabledboolean

Defaults to false with prompt and true with explicit HTML or blocks.

Example request

{
  "html": "<h1>Hello</h1>",
  "blocks": [
    {
      "id": "block_123",
      "type": "html",
      "content": "<h1>Hello</h1>",
      "styles": {
        "backgroundColor": "#f8fafc",
        "backgroundOpacity": 80,
        "textColor": "#111827",
        "borderRadius": 12,
        "borderColor": "#cbd5e1",
        "borderWidth": 1
      },
      "conditions": [
        {
          "id": "c1",
          "value": "plan:pro"
        }
      ]
    }
  ],
  "name": "Password Reset",
  "slug": "password-reset",
  "subject": "Reset your password, {{NAME}}",
  "previewText": "Use this link to reset your password.",
  "enabled": true
}

Response

Transactional email created

successboolean
warningsstring[]

Non-blocking advisories about a successful write. Present when an input was discarded or did not take effect as requested. This includes block fields that do not render as their names suggest, sequence email-step formatting restored on top of submitted blocks, and sender-identity conflicts such as a replyToName that differs from the saved profile. Each message identifies the affected input and gives recovery guidance. Absent when there is nothing to report.

Example response

{
  "success": true,
  "transactional": {
    "labels": [
      "Billing",
      "Receipts"
    ],
    "id": "tx_abc123",
    "name": "Welcome Email",
    "slug": "welcome-email",
    "emailId": "email_123",
    "enabled": true,
    "managedBy": "dashboard",
    "variables": [
      "NAME",
      "COMPANY",
      "PRODUCT"
    ],
    "subject": "Welcome, {{NAME}}",
    "previewText": "Your account is ready.",
    "emailPreset": "branded",
    "blocks": [
      {
        "id": "block_123",
        "type": "html",
        "content": "<h1>Hello</h1>",
        "styles": {
          "backgroundColor": "#f8fafc",
          "backgroundOpacity": 80,
          "textColor": "#111827",
          "borderRadius": 12,
          "borderColor": "#cbd5e1",
          "borderWidth": 1
        },
        "conditions": [
          {
            "id": "c1",
            "value": "plan:pro"
          }
        ]
      }
    ],
    "email": {
      "id": "email_123",
      "companyId": "company_123",
      "name": "Welcome email",
      "subject": "Welcome",
      "previewText": "Here's what to do next",
      "blocks": [
        {
          "id": "block_123",
          "type": "html",
          "content": "<h1>Hello</h1>",
          "styles": {
            "backgroundColor": "#f8fafc",
            "backgroundOpacity": 80,
            "textColor": "#111827",
            "borderRadius": 12,
            "borderColor": "#cbd5e1",
            "borderWidth": 1
          },
          "conditions": [
            {
              "id": "c1",
              "value": "plan:pro"
            }
          ]
        }
      ]
    }
  },
  "warnings": [
    "blocks[0].styles.color is not a supported field and was ignored. Button label color comes from the block-level `buttonTextColor` field. Supported styles fields: backgroundColor, backgroundOpacity, bleed, borderColor, borderRadius, borderWidth, keepAlign, paddingBottom, paddingLeft, paddingRight, paddingTop, textAlign, textColor."
  ]
}

Changes

    • info

      added the new optional request property ///////

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ////////// to the response with the status

    • info

      added the new optional request property //////

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property ///////// to the response with the status