POST
/v2/projects/{projectId}/branches/{branchId}Update a branch name
Updates the name of a branch in a project. Supply name with the new human-readable branch name; the response includes the updated branch details.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
branchIdintegerrequired
The integer identifier of the branch to rename.
projectIdintegerrequired
The integer identifier of the project containing the branch.
The new name for the branch.
namestringrequired
New branch name
200Returns the updated branch, including its identifier, name, active state, default status, and protection status.
activebooleanrequired
Indicates whether this branch is currently active (visible and usable for editing translations and keys). Inactive branches are hidden but still stored in the project.
authorobjectoptional
createdAtintegeroptional
Date of branch creation
idintegerrequired
Unique identifier of the branch
isDefaultbooleanrequired
Is branch default
isProtectedbooleanrequired
Is branch protected
mergeobjectoptional
namestringrequired
Human-readable name of the branch. Similar to Git branch names, it identifies the feature or purpose of this branch (e.g. 'feature-login-page')
originBranchNamestringoptional
Name of the branch this branch was created from
400Returned when the request is invalid, including when the required branch name is missing.
codestringrequired
paramsarray<object>optional
401Returned when the request is unauthenticated.
codestringrequired
paramsarray<object>optional
403Returned when the authenticated user does not have permission to rename the branch.
codestringrequired
paramsarray<object>optional
404Returned when the project or branch cannot be found.
codestringrequired
paramsarray<object>optional
Error handling
A 400 is returned when the request is invalid. A 401 is returned when the request is unauthenticated, and a 403 is returned when the authenticated user lacks permission to rename the branch. A 404 is returned when the project or branch cannot be found. name is required. The branchId and projectId path parameters must identify the branch and project.