Create an email
Create an email. With a prompt, AI generation starts asynchronously (202 — poll the returned generation). Without a prompt you get a blank draft (201), optionally seeded from an approved email template via template_id. Emails are reusable content assets: approve one, then attach it to blasts and flows.
Authorizations
Workspace API key, e.g. Authorization: Bearer tented_.... Create keys in Workspace Settings → API Keys.
Headers
Optional idempotency key. Replaying a request with the same key returns the stored result of the first attempt. If the first attempt is still in flight, the replay fails with 409 idempotency_in_progress.
Body
Internal name (never shown to recipients).
1 - 200AI brief describing the email to generate.
1 - 10000Seed content and sender defaults from an approved email template.
Structured data available to the generation as tokens. Requires prompt or template_id.
Subject line. Must be set before approval.
998Preheader text.
200Sender display name. Must be set before approval.
120Sender address. Must be set before approval; sending requires a verified domain.
Reply-to address. Must be set before approval.
Response
Draft created (no prompt supplied).
Full email object.
Email ID.
Internal name (never shown to recipients).
Lifecycle state.
draft, approved Latest content version number.
Subject line.
Preheader text.
Sender display name.
Sender address. Sending requires a verified domain.
Reply-to address.
Version that is approved, or null.
Number of content versions (equals current_version).
Whether plain text has been manually overridden.
When the plain-text override was set.
True when HTML changed after a plain-text override, so the override may be stale.
Creation time.
Last update.
Who created the email (API key name or user).
Status of the most recent AI generation, when one exists.
generating, completed, failed API path to fetch the latest HTML, e.g. /v1/emails/{emailId}/content.
API path to fetch the plain-text rendition.