---
title: Drafts and attachments API | SendHQ Docs
description: Build composer flows with private attachment storage.
canonical: https://sendhq.cc/docs/api-reference/drafts
last-updated: 2026-09-07
---
# Drafts and attachments

Build composer flows with private attachment storage.

POST `/drafts`

API key

## Create a composer draft

Create a composer draft

```shell
curl https://sendhq.cc/api/v1/drafts \
  -X POST \
  -H "Authorization: Bearer $SENDHQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from":"hello@example.com","to":["customer@example.net"],"subject":"Hello"}'
```

```json
{
  "id": "dr_…",
  "attachments": []
}
```

GET `/drafts`

API key

## List composer drafts

List composer drafts

```shell
curl https://sendhq.cc/api/v1/drafts \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
```

```json
{
  "data": [],
  "count": 0
}
```

GET `/drafts/:id`

API key

## Retrieve a draft and attachments

Retrieve a draft and attachments

```shell
curl https://sendhq.cc/api/v1/drafts/id_value \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
```

```json
{
  "id": "dr_…",
  "attachments": []
}
```

PUT `/drafts/:id`

API key

## Replace draft content

Replace draft content

```shell
curl https://sendhq.cc/api/v1/drafts/id_value \
  -X PUT \
  -H "Authorization: Bearer $SENDHQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from":"hello@example.com","to":["customer@example.net"],"subject":"Updated subject","text":"Updated body"}'
```

```json
{
  "id": "dr_…"
}
```

DELETE `/drafts/:id`

API key

## Discard a draft

Discard a draft

```shell
curl https://sendhq.cc/api/v1/drafts/id_value \
  -X DELETE \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
```

```json
{
  "ok": true
}
```

POST `/drafts/:id/attachments`

API key

## Upload an attachment to a draft

Upload raw file bytes. Set Content-Type and X-Filename. A message can contain at most 10 files and 10 MB total.

**Optional headers** `X-Filename`

```shell
curl https://sendhq.cc/api/v1/drafts/id_value/attachments \
  -X POST \
  -H "Authorization: Bearer $SENDHQ_API_KEY" \
  -H "Content-Type: application/pdf" \
  -H "X-Filename: invoice.pdf" \
  --data-binary @invoice.pdf
```

```json
{
  "id": "att_…",
  "filename": "invoice.pdf",
  "sizeBytes": 48231,
  "available": true
}
```

GET `/attachments/:id`

API key

## Download a private attachment

Download a private attachment

```shell
curl https://sendhq.cc/api/v1/attachments/id_value \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
```

DELETE `/attachments/:id`

API key

## Delete a private attachment

Delete a private attachment

```shell
curl https://sendhq.cc/api/v1/attachments/id_value \
  -X DELETE \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
```

```json
{
  "ok": true
}
```

GET `/sending-identities`

API key

## List verified sender identities

List verified sender identities

```shell
curl https://sendhq.cc/api/v1/sending-identities \
  -X GET \
  -H "Authorization: Bearer $SENDHQ_API_KEY"
```

```json
{
  "domains": [],
  "addresses": [],
  "localParts": []
}
```
