---
title: "Upload attachment bytes authorized against this draft before adding its storage reference"
method: POST
path: "/email/drafts/{draftId}/attachments"
tags: ["email"]
---

# Upload attachment bytes authorized against this draft before adding its storage reference

`POST /email/drafts/{draftId}/attachments`

## Request

- Base URL: `https://www.dench.com/api/v1`
- URL: `https://www.dench.com/api/v1/email/drafts/{draftId}/attachments`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Upload attachment bytes authorized against this draft before adding its storage reference.

## Path parameters

- `draftId` string, required

## Request body

- object
  - `name` string, required
  - `contentType` string, required
  - `contentBase64` string, required

## Response `200`

Successful response

- object
  - `storageId` string, required
  - `name` string, required
  - `contentType` string, required
  - `size` number, required

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid authentication
- `404`: Operation or resource not found
- `500`: Server error

---

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