---
title: "Delete Branch"
method: DELETE
path: "/projects/{projectId}/branches/{branchId}"
tags: ["Branches"]
---

# Delete Branch

`DELETE /projects/{projectId}/branches/{branchId}`

## Request

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

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

## Path parameters

- `projectId` integer, required
- `branchId` integer, required

## Headers

- `Prefer` string

## Response `202`

Accepted for asynchronous processing (when `Prefer: respond-async` is sent)

- NodeDeleteResource: 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` NodeDeleteResponseModel, required
    - `identifier` string
    - `status` 'created' | 'in_progress' | 'finished' | 'failed'
    - `progress` integer: in percentages
    - `attributes` union: The deleted node identifier, keyed by resource type.
      - object
        - `branchId` integer, required
      - object
        - `directoryId` integer, required
      - object
        - `fileId` integer, required
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `startedAt` string, date-time
    - `finishedAt` string, date-time
    - `error` object: Only present when the operation failed with a user-actionable reason.
      - `message` string

## Other responses

- `204`: Branch was successfully deleted
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Project or branch with specified id was not found
- `405`: Method Not Allowed
- `409`: Conflict
- `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)
