Skip to main content
POST
/
orgs
/
{org_id}
/
nodes
/
{node_id}
/
branches
Create Branch
curl --request POST \
  --url https://api.example.com/orgs/{org_id}/nodes/{node_id}/branches \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "base_branch": "main"
}
'
{
  "node_id": "<string>",
  "name": "<string>",
  "head_commit": "<string>",
  "created_by": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "base_branch": "<string>",
  "head_commit_message": "<string>",
  "last_activity": "2023-11-07T05:31:56Z"
}

Headers

authorization
string | null

Path Parameters

org_id
string
required
node_id
string
required

Body

application/json

Request model for creating a branch.

name
string
required

Branch name

base_branch
string | null
default:main

Base branch to fork from

Response

Successful Response

Response model for branch data.

node_id
string
required

Node ID

name
string
required

Branch name

head_commit
string
required

Head commit ID

created_by
string
required

User who created the branch

created_at
string<date-time>
required

Creation timestamp

updated_at
string<date-time>
required

Last update timestamp

base_branch
string | null

Base branch name

head_commit_message
string | null

Head commit message

last_activity
string<date-time> | null

Last activity timestamp