**Source URL:** https://limited.veevavault.dev/quality/vault-api/api-reference/22.1/documents/document-attachments/create-multiple-document-attachments.md

# Create Multiple Document Attachments



Create multiple document attachments in bulk with a JSON or CSV input file. You must first load the attachments to the [file staging server](/vault-api/guides/file-staging). This works for version-specific attachments and attachments at the document level. If the attachment already exists, Vault uploads the attachment as a new version of the existing attachment. Learn more about [attachment versioning in Vault Help](https://platform.veevavault.help/en/lr/24287).

* The maximum input file size is 1GB.

* The values in the input must be UTF-8 encoded.

* CSVs must follow the standard RFC 4180 format, with some [exceptions](/vault-api/references/csv-rfc-deviations).

* The maximum batch size is 500.

<Endpoint path="/api/{version}/objects/documents/attachments/batch" method="POST"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `application/json` or `text/csv` |
| `Accept` | `application/json` (default) or `text/csv` or `application/xml` |
</FieldTable>

## Body Parameters {#body-parameters}

Prepare a CSV or JSON input file.

<FieldTable>
| Name | Description |
| --- | --- |
| `document_id__v` | The document ID to add this attachment. |
| `filename__v` | The name for the new attachment. This name must include the file extension, for example, `MyAttachment.pdf`. If an attachment with this name already exists, this attachment is added as a new version. |
| `file` | The filepath of the attachment on the file staging server. |
| `description__v` | Optional: Description of the attachment. Maximum 1000 characters. |
| `major_version_number__v` | Optional: The major version of the source document. |
| `minor_version_number__v` | Optional: The minor version of the source document. |
| `external_id__v` | Optional: Set an external ID value on the attachment. |
</FieldTable>
<DownloadButton href="/sample-files/bulk-create-document-attachments.json" label="Download Input File"></DownloadButton>

## Request {#request}

<CodeExample title="">
```
curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: text/csv" \
-H "Accept: text/csv" \
--data-binary @"C:\Vault\Documents\create_attachments.csv" \
https://myvault.veevavault.com/api/v17.3/objects/documents/attachments/batch

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
    "responseStatus": "SUCCESS",
    "data": [
        {
            "responseStatus": "SUCCESS",
            "id": 39,
            "version": 1
        }
    ]
}

```
</CodeExample>

## Response Details {#response-details}

On SUCCESS, returns the ID and version of new attachments. Attachments created unsuccessfully are reported with an error message.



---

**Previous:** [Create Document Attachment](/quality/vault-api/api-reference/22.1/documents/document-attachments/create-document-attachment)  
**Next:** [Restore Document Attachment Version](/quality/vault-api/api-reference/22.1/documents/document-attachments/restore-document-attachment-version)