Skip to content

Create a branch

POST
/v1/sandbox/{sandboxID}/git/create-branch

Create a new branch in a repository. Optionally check it out immediately.

sandboxID
required
string

Unique sandbox identifier.

object
path
required

Path to the git repository.

string
name
required

Name of the new branch.

string
checkout

Checkout the branch after creating it.

boolean
base_branch

Optional base branch or revision to create the branch from.

string
nullable

Branch created.

object
output
required

Command output text.

string
exit_code
required

Exit code of the git command.

integer format: int32

Bad request – validation error.

object
message
required

Summary message, e.g. “Invalid request”.

string
errors
required
Array<object>
object
field
required

JSON field name that failed validation (e.g. “path”, “command”).

string
error
required

Human-readable description of the validation failure.

string

Unauthorized – invalid or missing API key.

object
message
required

Human-readable error message.

string