---
title: "Create a draft"
method: POST
path: "/v1/inboxes/{id}/drafts"
tags: ["Drafts"]
---

# Create a draft

`POST /v1/inboxes/{id}/drafts`

## Request

- Base URL: `https://anjal.app`
- URL: `https://anjal.app/v1/inboxes/{id}/drafts`
- Auth: API key in header `X-API-Key`

`labels` are applied to the message when the draft is sent. Set
`sendAt` to schedule the send: Anjal sends it at that time, no cron
needed.

## Request body

- DraftInput
  - `to` union
    - string, email
    - string[]
  - `cc` union
    - string, email
    - string[]
  - `bcc` union
    - string, email
    - string[]
  - `subject` string
  - `plainBody` string
  - `htmlBody` string
  - `replyToMessageId` string, uuid
  - `labels` union: Labels as an array or a comma-separated string. Stored lowercase and deduplicated; at most 32 labels of at most 64 characters, no commas.
    - string[]
    - string
  - `sendAt` string, date-time, nullable: Schedule the send: ISO 8601 with an offset, e.g. `2026-10-01T09:00:00-04:00`. Must be in the future and at most 90 days ahead. A scheduled draft needs at least one recipient and a body. On update, `null` cancels the schedule. Anjal checks for due drafts about every 20 seconds. If the send fails, the draft is kept, `sendError` is set, `sendAt` is cleared and `draft.send_failed` fires.

## Response `201`

Created

- Draft
  - `id` string, uuid
  - `inboxId` string, uuid
  - `to` string[]
  - `cc` string[]
  - `bcc` string[]
  - `subject` string
  - `plainBody` string, nullable
  - `htmlBody` string, nullable
  - `replyToMessageId` string, uuid, nullable
  - `labels` string[]: Applied to the message when the draft is sent.
  - `sendAt` string, date-time, nullable: When Anjal will send this draft. Null if not scheduled.
  - `sendError` string, nullable: Why the last scheduled send failed. The draft is kept and `sendAt` is cleared.
  - `createdAt` string, date-time
  - `updatedAt` string, date-time

## Other responses

- `400`: Validation error, e.g. sendAt in the past, more than 90 days ahead, or a scheduled draft without recipients or a body

---

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