Skip to main content
PATCH
/
api
/
v1
/
emails
/
{emailId}
/
blocks
Update Email Blocks
curl --request PATCH \
  --url https://api.sequenzy.com/api/v1/emails/{emailId}/blocks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "html": "<string>",
  "blocks": [
    {}
  ],
  "blockId": "<string>",
  "type": "<string>",
  "content": "<string>"
}
'
{
  "success": true,
  "email": {
    "id": "email_123",
    "companyId": "company_123",
    "name": "Welcome",
    "subject": "Welcome",
    "previewText": null,
    "blocks": [{ "id": "legacy-block", "type": "html", "content": "<table>...</table>" }],
    "createdAt": "2026-04-19T12:00:00.000Z",
    "updatedAt": "2026-04-19T12:05:00.000Z"
  }
}

Update Email Blocks

You can replace an email body with raw HTML or structured blocks. You can also mutate an existing block between text and html.

Request

emailId
string
required
Email ID.
html
string
Raw HTML body. Replaces all blocks with a native HTML body.
blocks
array
Structured email blocks. Replaces all existing blocks.
blockId
string
Existing block ID to mutate.
type
string
New block type. Type mutation supports text and html.
content
string
Optional replacement content for the mutated block.
curl -X PATCH "https://api.sequenzy.com/api/v1/emails/email_123/blocks" \
  -H "Authorization: Bearer API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"blockId":"legacy-block","type":"html"}'

Responses

{
  "success": true,
  "email": {
    "id": "email_123",
    "companyId": "company_123",
    "name": "Welcome",
    "subject": "Welcome",
    "previewText": null,
    "blocks": [{ "id": "legacy-block", "type": "html", "content": "<table>...</table>" }],
    "createdAt": "2026-04-19T12:00:00.000Z",
    "updatedAt": "2026-04-19T12:05:00.000Z"
  }
}