Generation

Generates a draft email from scratch as structured editor-compatible blocks. By default, the generated content is wrapped with the company's logo and footer.

post/generate/email

Request

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

Request body

promptstring required

What you want the email to say or accomplish.

stylestring

Optional style guidance. Pass "designed" or "plain" to force the designed or plain-text email style; other values (such as "minimal", "branded", or "promotional") are freeform prompt guidance. Defaults to the company's email style preference (designed unless the company chose plain text).

tonestring

Optional tone guidance.

applyBrandingboolean

Whether to wrap generated content with the company logo and footer. Set to false to return raw generated content blocks.

emailType'marketing' | 'transactional'

Email type. Transactional emails include a footer without an unsubscribe link.

Example request

{
  "prompt": "Announce our new analytics dashboard to trial users",
  "style": "branded",
  "tone": "friendly"
}

Response

Email generated successfully

successboolean
subjectstring
previewTextstring
messagestring

Example response

{
  "success": true,
  "subject": "Meet your new analytics dashboard",
  "previewText": "A clearer way to track what matters",
  "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"
        }
      ]
    }
  ],
  "message": "Generated a draft email."
}

Changes

    • 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