Skip to main content
PATCH
/
api
/
v1
/
transactional
/
{idOrSlug}
Update Transactional Email
curl --request PATCH \
  --url https://api.sequenzy.com/api/v1/transactional/{idOrSlug} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "enabled": true,
  "subject": "<string>",
  "previewText": "<string>",
  "html": "<string>",
  "blocks": [
    {}
  ]
}
'
{
  "success": true,
  "transactional": {
    "id": "txn_abc123",
    "name": "Welcome Email",
    "slug": "welcome",
    "emailId": "email_abc123",
    "enabled": true,
    "subject": "Welcome, {{NAME}}",
    "previewText": "Your account is ready.",
    "blocks": [
      {
        "id": "block_123",
        "type": "text",
        "content": "<p>Welcome to {{COMPANY_NAME}}</p>",
        "variant": "html"
      }
    ],
    "variables": ["NAME", "COMPANY_NAME"],
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:35:00Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt

Use this file to discover all available pages before exploring further.

Update a transactional email by ID or slug. You can update metadata like name and enabled, or replace the linked email body with html or blocks.

Path Parameters

idOrSlug
string
required
Transactional email ID or slug

Request

name
string
Transactional email name
enabled
boolean
Whether this transactional email can be sent
subject
string
Email subject line
previewText
string
Email preview text
html
string
Raw HTML body. Provide either html or blocks, not both.
blocks
array
Sequenzy email blocks. Provide either blocks or html, not both.
curl -X PATCH "https://api.sequenzy.com/api/v1/transactional/welcome" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subject": "Welcome, {{NAME}}",
    "html": "<p>Welcome to {{COMPANY_NAME}}</p>"
  }'

Responses

{
  "success": true,
  "transactional": {
    "id": "txn_abc123",
    "name": "Welcome Email",
    "slug": "welcome",
    "emailId": "email_abc123",
    "enabled": true,
    "subject": "Welcome, {{NAME}}",
    "previewText": "Your account is ready.",
    "blocks": [
      {
        "id": "block_123",
        "type": "text",
        "content": "<p>Welcome to {{COMPANY_NAME}}</p>",
        "variant": "html"
      }
    ],
    "variables": ["NAME", "COMPANY_NAME"],
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:35:00Z"
  }
}