Create Branch
Create a new branch from an existing branch or ref. This is useful for agent workflows, ephemeral previews, or server-side automation where you do not want to clone the repo first.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Repository name. Names that contain / or any other character that is not safe in a URL path segment must be URL encoded so the value occupies a single path segment. For example pierre/example is sent as pierre%2Fexample. Plain names such as example can be sent as-is. The server URL-decodes the value before resolving the repository.
Body
Create a branch from another branch or ref. The source and destination can live in the default namespace or the ephemeral namespace.
Create-branch request body describing the new branch and its base ref.
Destination branch name.
"feature/new-onboarding"
Preferred source branch name. Use base_ref when you need an exact ref.
"main"
Whether the base branch should be resolved from the ephemeral namespace.
false
Optional source ref or revision. This supersedes base_branch when provided.
Allow non-fast-forward updates when recreating an existing branch.
Optional fallback base branch name used by the backend when it needs another starting point.
Whether the new branch should be created in the ephemeral namespace.
false
Response
Branch creation result.
Result of creating a branch, including the resulting ref state.
Human-readable result message.
"branch created"
Destination branch name.
"feature/new-onboarding"
Whether the created branch is ephemeral.
false
Resolved commit SHA at the new branch tip.
"abc123def4567890abc123def4567890abc123de"