---
title: "Create a draft"
method: POST
path: "/mailboxes/{address}/drafts"
tags: ["Drafts"]
---

# Create a draft

`POST /mailboxes/{address}/drafts`

## Request

- Base URL: `https://faivelo.com/api/v1`
- URL: `https://faivelo.com/api/v1/mailboxes/{address}/drafts`
- Auth: HTTP bearer

Saves a draft in the mailbox's Drafts folder without sending it. Every field is optional. The draft is a real message: a person can open it in webmail or any mail app, edit it and send it. Requires scope `mail:write`.

## Path parameters

- `address` string, required

## Headers

- `Idempotency-Key` string

## Request body

- DraftRequest
  - `to` string: Comma-separated recipients
  - `cc` string
  - `bcc` string
  - `subject` string
  - `text` string
  - `html` string
  - `replyTo` string, email
  - `fromName` string: From display name the draft is sent under; default: the mailbox's name
  - `inReplyTo` string: Message-ID being replied to, so the draft threads correctly
  - `references` string
  - `attachments` object[]: Up to 10 files, 10 MB in total
    - `filename` string, required
    - `content` string, required: Base64-encoded file content
    - `contentType` string, required

## Response `200`

Draft saved

- object
  - `success` boolean
  - `data` DraftResponse
    - `uid` integer: The draft's UID in the Drafts folder
    - `replayed` boolean: Present and true when an Idempotency-Key matched an earlier request

## Other responses

- `401`: Missing or invalid API key
- `402`: The account's plan does not include the API (`plan_required`)
- `403`: The key lacks the required scope
- `404`: Resource not found
- `429`: Rate limit exceeded

---

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