---
title: "Edit Distribution"
method: PATCH
path: "/projects/{projectId}/distributions/{hash}"
tags: ["Distributions"]
---

# Edit Distribution

`PATCH /projects/{projectId}/distributions/{hash}`

## Request

- Base URL: `https://api.crowdin.com/api/v2`
- URL: `https://api.crowdin.com/api/v2/projects/{projectId}/distributions/{hash}`
- Auth: none declared
- TypeScript: <https://skmtc.dev/crowdin/apis/crowdin-api-v2/docs/projects/:projectId/distributions/:hash/patch.ts> (a function with typed inputs; its response is checked against the schema)

**Required scopes:** `project.translation` (Read and Write).

## Path parameters

- `projectId` integer, required
- `hash` string, required

## Request body

- DistributionOperation[]: A JSON Patch document as defined by <a href="https://tools.ietf.org/html/rfc6902#section-3" target="_blank">RFC 6902</a>
  - `op` 'replace' | 'test', required: Patch operation to perform
  - `path` '/name' | '/bundleIds', json-pointer, required: A JSON Pointer as defined by <a href="https://tools.ietf.org/html/rfc6901" target="_blank">RFC 6901</a>

## Response `200`

Distribution was successfully updated

- StringBasedDistributionResource: Base schema of resource container. Container is a wrapper object that contains payload in required `data` property and provides space for adding any other metadata.
  - `data` StringBasedDistribution, required: Class DistributionResponseModel
    - `hash` string
    - `manifestUrl` string
    - `name` string
    - `bundleIds` integer[]
    - `createdAt` string, date-time
    - `updatedAt` string, date-time: in UTC

## Other responses

- `400`: Invalid Request Body
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Project or distribution was not found
- `500`: Internal Server Error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/crowdin/apis/crowdin-api-v2.md) - [All operations](https://skmtc.dev/crowdin/apis/crowdin-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/crowdin/apis/crowdin-api-v2/revisions/27aae7751699?raw)
