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

# Create Multiple Document Attachments

Create multiple document attachments in bulk with a JSON or CSV input file. You must first load the attachments to [file staging](/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#version-specific).

*   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" />

## Headers

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

## Body Parameters

Prepare a CSV or JSON input file.

<FieldTable>
| Name | Description |
| --- | --- |
| `document_id__v`<Requiredness type="required" /> | The document ID to add this attachment. |
| `filename__v`<Requiredness type="required" /> | 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`<Requiredness type="required" /> | The filepath of the attachment on file staging. |
| `description__v`<Requiredness type="optional" /> | Description of the attachment. Maximum 1000 characters. |
| `major_version_number__v`<Requiredness type="optional" /> | The major version of the source document. |
| `minor_version_number__v`<Requiredness type="optional" /> | The minor version of the source document. |
| `external_id__v`<Requiredness type="optional" /> | Set an external ID value on the attachment. |
</FieldTable>

 

<DownloadButton href="sample-files/bulk-create-document-attachments.json" label="Download Input File" />

## Request

<CodeExample title="">
```bash
curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: application/json" \
-H "Accept: text/csv" \
--data-raw '[
    {
        "document_id__v": "5",
        "filename__v": "CholecapBrochure.docx",
        "file": "u108803/CholecapBrochure.docx"
    }
]' \
https://myvault.veevavault.com/api/v17.3/objects/documents/attachments/batch
```
</CodeExample>

## Response

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

## 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](/vault-api/api-reference/26.1/documents/document-attachments/create-document-attachment)  
**Next:** [Restore Document Attachment Version](/vault-api/api-reference/26.1/documents/document-attachments/restore-document-attachment-version)