**Source URL:** https://general.veevavault.dev/vault-api/api-reference/26.1/custom-pages/add-or-replace-single-client-code-distribution.md

# Add or Replace Single Client Code Distribution



Add or replace client code in Vault by uploading a ZIP file of the client code distribution. Vault unpacks and compares the uploaded distribution with other distributions in the Vault and:

* Adds the distribution if the distribution name is new.

* Replaces a distribution if it has the same name and the client code filenames or contents are different.

* Makes no changes if the distribution name exists and the code is the same.

<Endpoint path="/api/{version}/uicode/distributions/" method="POST"></Endpoint>

## Headers {#headers}

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

#### File Upload {#file-upload}

To upload the file, use the multi-part attachment with the file component `"file={file_name}"`. The maximum allowed total file size for all distributions in a Vault is 50 MB.

## Request {#request}

<CodeExample title="">
```
curl -X POST -H "Authorization: {SESSION_ID}" \
-H "Content-Type: multipart/form-data" \
-F "file=@custom-page.zip" \
https://myvault.veevavault.com/api/v25.1/uicode/distributions/

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
    "responseStatus": "SUCCESS",
    "data": {
        "name": "custom_page__c",
        "updateType": "ADDED",
        "checksum": "5e7db21710fc4cddfaf5ad5eafdf7052"
    }
}

```
</CodeExample>

## Response Details {#response-details}

<FieldTable>
| Name | Description |
| --- | --- |
| `name` | The name of the distribution as specified in the manifest file. |
| `updateType` | Whether the distribution was added (`ADDED`), replaced (`MODIFIED`), or left unchanged (`NO_CHANGE`). |
| `checksum` | A unique string used to identify the distribution and whether the contents have changed. |
</FieldTable>

---

**Previous:** [Download Single Client Code Distribution](/vault-api/api-reference/26.1/custom-pages/download-single-client-code-distribution)  
**Next:** [Delete Single Client Code Distribution](/vault-api/api-reference/26.1/custom-pages/delete-single-client-code-distribution)