---
title: "Create an attachment"
method: POST
path: "/v1/attachments"
tags: ["Attachments"]
---

# Create an attachment

`POST /v1/attachments`

Use the Add Attachment REST request with a multipart/form-data to attach a document file to an Account, a Subscription, an Invoice, a Credit Memo, or a Debit Memo.

You can only use this operation if you have a Billing role that includes the Manage Attachments permission.
For more information, see [Billing roles](https://docs.zuora.com?resourceId=platform-billing-roles).
To change your Billing role, contact your Zuora platform administrator.

**Note**: The Credit and Debit Memos feature is only available if you have [Invoice Settlement](https://docs.zuora.com?resourceId=billing-invoice-settlement) enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see [Invoice Settlement Enablement and Checklist Guide](https://docs.zuora.com?resourceId=billing-invoice-settlement-migration-checklist-and-guide) for more information.

## Query parameters

- `description` string
- `associatedObjectType` 'Account' | 'Invoice' | 'Subscription' | 'CreditMemo' | 'DebitMemo', required
- `associatedObjectKey` string, required

## Headers

- `Idempotency-Key` string
- `Accept-Encoding` string
- `Content-Encoding` string
- `Zuora-Track-Id` string
- `Zuora-Entity-Ids` string
- `Zuora-Org-Ids` string
- `Zuora-Version` string

## Response `200`

OK

- POSTAttachmentResponseType
  - `fileId` string — ID to identify the attached file. Use this file ID with [Get files](https://developer.zuora.com/api-references/api/operation/GET_Files) to download the file.
  - `id` string — Attachment id.
  - `success` boolean — Returns `true` if the request was processed successfully.

## Other responses

- `500` — Internal Server Error
- `4XX` — Request Errors

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
