---
title: "Generate email"
method: POST
path: "/generate/email"
tags: ["Generation"]
---

# Generate email

`POST /generate/email`

Generates draft marketing email blocks using the same AI writer flow as the editor chat.

## Request body

- object
  - `prompt` string, required — What you want the email to say or accomplish.
  - `style` string — Optional style guidance.
  - `tone` string — Optional tone guidance.

## Response `200`

Email generated successfully

- object
  - `success` boolean
  - `subject` string
  - `previewText` string
  - `blocks` EmailBlock[]
    - `id` string
    - `type` 'text' | 'html' | 'heading' | 'list' | 'button' | 'spacer' | 'divider' | 'image' | 'columns' | 'conditional-group' | 'card' | 'cta' | 'social' | 'logo' | 'footer' | 'video' | 'product', required
    - `content` string — Content for text, html, and heading-like blocks.
  - `message` string

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `403` — No company selected
- `500` — Generation failed

## Changes

- **2026-04-20** `4abb666fde76` — 1 warning
  - removed the optional property `html` from the response with the `200` status
- **2026-04-20** `ed7439559402` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/generate/email/post.md)

---

[API](https://skmtc.dev/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.dev/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/revisions/b040bb8c6608/schema)
