# General Translation Platform: Crea un branch
URL: https://generaltranslation.com/it/docs/platform/openapi/reference/branches/create-branch.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: Crea un branch. Richiede project:files:write; con i piani gratuiti è possibile creare solo il branch predefinito.

{/* Questo file è stato generato da Fumadocs. Non modificarlo direttamente. Per apportare modifiche, esegui nuovamente il comando di generazione. */}

## Endpoint

`POST https://api.gtx.dev/v2/projects/{projectId}/branches`

**Operation ID:** `createBranch`

**Tags:** `Branches and tags`

**Summary:** Create a branch

Create a branch. Requires `project:files:write`; free plans can only create the default branch.

Authentication: required. Send an API key in the `Authorization: Bearer <key>` header when authenticating.

### Parameters

- `projectId` (path, string, required)
- `gt-api-version` (header, "2026-10-08.v1", required): API contract version. Must be `2026-10-08.v1` or later; requests without it or with an older version return 400.

### Request body (required)

Body (`application/json`, object):
- `name` (string, required): Branch name, unique within the project.
- `isDefault` (boolean): Create the project's default branch. Rejected with 409 when the project already has one; change the default by updating a branch instead. Default: `false`.

### Responses

**201**: Branch created
Response body (`application/json`, object):
- `branch` (object, required)
  - `id` (string, required)
  - `name` (string, required)
  - `isDefault` (boolean, required): Whether this is the project's one default branch.

**400**: The request is malformed or failed validation.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**401**: Authentication is missing or invalid.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**403**: The caller is authenticated but not allowed to perform this operation or access the requested resource.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**404**: The requested resource was not found.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**409**: The project already has a branch with this name, or `isDefault` is set and the project already has a default branch.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**413**: The request, or the data it would return, exceeds a size or item limit.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**415**: The request body's Content-Type is missing or not supported. Send the body as application/json.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**429**: Too many requests. The rate limit was exceeded.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

**500**: An unexpected server error occurred.
Response body (`application/json`, object):
- `error` (string, required)

Response body (`text/html`, string):

Complete OpenAPI 3.1 specification: https://generaltranslation.com/openapi.yaml

OpenAPI schema: [openapi.json](https://generaltranslation.com/openapi.json)

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
