v2

latestOpenAPI 3.1.0MIT2026-07-26105151330.5 KB
Emails

Generate Email (Async)

Generate one email or a multi-email series for a project using its brand context and optional images. Requires API key with email:write. Provide count (1-12) to request a specific series length, or omit it to infer from the prompt. Returns immediately with a conversationId and pending status. Use GET /v1/projects/emails/{conversationId}/status to retrieve production HTML, screenshots, and per-email IDs.

post/v1/projects/emails/generate

Request body

projectIdstring required
promptstring required
modelstring
webModeboolean

Allow MigmaAI to do research, use connectors, mcp and more. It may take longer to generate the email. Use only if the prompt is unclear or requires additional information.

languagesstring[]

The languages to generate the email in. If not provided, the email will be generated as instructed by the prompt.

visibility'private' | 'unlisted' | 'public'

Set the visibility of the generated conversation. Private conversations are only visible to the user, unlisted conversations are accessible via direct link but not listed publicly, and public conversations are visible in the public gallery.

referenceIdstring

Optional conversation ID to remix so you can create personalized variants from an existing conversation.

countinteger

Optional target number of emails to generate for a series. Omit to let Migma infer single email vs series from the prompt.

Response

Email generation started

successboolean required
errorstring nullable