---
title: "POST /email/drafts"
method: POST
path: "/email/drafts"
---

# POST /email/drafts

`POST /email/drafts`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/email/drafts`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Request body

- object: Request body for creating an email draft
  - `agentId` string, required: Owning agent ID
  - `fromIdentityId` string: Optional EmailIdentity ID to send from. Must belong to this agent and be verified.
  - `to` string[]: Recipient email addresses (may be empty for an incomplete draft)
  - `cc` string[]: CC recipients
  - `bcc` string[]: BCC recipients
  - `subject` string: Subject line
  - `body` string: Plain-text body
  - `bodyHtml` string: HTML body
  - `inReplyTo` string: Optional In-Reply-To header for threading on send
  - `references` string[]: Optional References chain for threading
  - `metadata` object: Arbitrary metadata

## Response `200`

OK

- object: Email draft resource
  - `id` string, required: Unique identifier of the draft
  - `agentId` string, required: Owning agent ID
  - `orgId` string, required: Owning organization ID
  - `fromIdentityId` string, nullable, required: EmailIdentity used as the sender, or null to use the agent's primary identity at send time
  - `to` string[], required: Recipient email addresses
  - `cc` string[], required: CC recipient email addresses
  - `bcc` string[], required: BCC recipient email addresses
  - `subject` string, nullable, required: Subject line, or null if not yet written
  - `body` string, nullable, required: Plain-text body, or null if not yet written
  - `bodyHtml` string, nullable, required: HTML body, or null if not provided
  - `inReplyTo` string, nullable, required: Optional In-Reply-To Message-ID for threading on send
  - `references` string[], required: Optional References Message-ID chain for threading
  - `metadata` object, nullable, required: Arbitrary metadata
  - `createdAt` string, date-time, required: Timestamp when the draft was created
  - `updatedAt` string, date-time, required: Timestamp when the draft was last updated

---

[API](https://skmtc.dev/useanima/apis/anima-api.md) · [All operations](https://skmtc.dev/useanima/apis/anima-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanima/apis/anima-api/revisions/aaa148188980?raw)
