**Source URL:** https://limited.veevavault.dev/sitevault/vault-api/api-reference/22.1/vault-objects/object-record-attachments/create-object-record-attachment.md

# Create Object Record Attachment



Create a single object record attachment. 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).

<Endpoint path="/api/{version}/vobjects/{object_name}/{object_record_id}/attachments" method="POST"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `multipart/form-data` |
| `Accept` | `application/json` (default) or `application/xml` |
</FieldTable>

## URI Path Parameters {#uri-path-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `{object_name}` | The object `name__v` field value (`product__v`, `country__v`, `custom_object__c`, etc.). |
| `{object_record_id}` | The object record `id` field value. |
</FieldTable>

## File Upload {#file-upload}

To upload the file, use the multi-part attachment with the file component `"file={file_name}"`. The maximum allowed file size is 4GB.

If an attachment is added which has the same filename as an existing attachment on a given object record, the new attachment is added as a new version of the existing attachment. If an attachment is added which *is* exactly the same (same MD5 checksum value) as an existing attachment on a given object record, the new attachment is not added.

The following attribute values are determined based on the file in the request: `filename__v`, `format__v`, `size__v`.

## Request {#request}

<CodeExample title="">
```
curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: multipart/form-data" \
-F "file=my_attachment_file.png" \
https://myvault.veevavault.com/api/v15.0/vobjects/site__v/1357752909483/attachments

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
    "responseStatus": "SUCCESS",
    "data":
    [{
        "id": "558",
        "version__v": 3
    }]
}

```
</CodeExample>

---

**Previous:** [Download All Object Record Attachment Files](/sitevault/vault-api/api-reference/22.1/vault-objects/object-record-attachments/download-all-object-record-attachment-files)  
**Next:** [Create Multiple Object Record Attachments](/sitevault/vault-api/api-reference/22.1/vault-objects/object-record-attachments/create-multiple-object-record-attachments)