Creates a branch with a copy of the keys and translations of another branch.
HTTP
POST /projects/{projectId}/branchesAccess: Session token only. API keys get 403 with insufficient_scope.
Role: Project reviewer or manager.
Path parameters #
| Parameter | Description |
|---|---|
projectId | The id of the project. |
Request body #
JSON.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Letters, digits, ., _, - and /, starting with a letter or digit. At most 60 characters. |
base | string | yes | The name of the branch to copy, such as main. |
JSON
{ "name": "feature/checkout", "base": "main" }Response 201 #
The branch.
JSON
{
"id": "0197a3c8-6f75-7c66-a9bd-1d5a7e2c4f86",
"projectId": "0197a3c6-4d53-7a44-87fb-9b3e5c0a2d64",
"name": "feature/checkout",
"base": "main",
"status": "active",
"progress": 40,
"progressLabel": "80 / 200",
"openKeys": 30,
"ageMinutes": 15
}Response fields #
| Field | Type | Description |
|---|---|---|
id | string | The id of the branch. |
projectId | string | The id of its project. |
name | string | The name. |
base | string or null | The name of the branch it was made from. null for main. |
status | string | protected (the main branch), active, frozen, or ready when every key is published in every language. |
progress | integer | Percent of published translations over all keys and languages. |
progressLabel | string | The same as a text such as 80 / 200, with thousands separators. |
openKeys | integer | Keys that are not published in every language yet. |
ageMinutes | integer | Minutes since the branch last changed. |
Errors #
| Status | error | When |
|---|---|---|
| 401 | unauthenticated | The token is missing or not valid. |
| 404 | not_found | The project does not exist in your organisation, you have no access to it, or projectId is not a UUID. |
| 403 | forbidden | You are a translator in the project. |
| 409 | conflict | A branch with this name exists. fields has name: taken. |
| 422 | invalid_request | name is not valid, or base is not a branch of the project (unknown). |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.