Skip to main content
POST
/
api
/
repos
/
{namespace}
/
{repo_name}
/
branches
Create a new branch
curl --request POST \
  --url https://hub.oxen.ai/api/repos/{namespace}/{repo_name}/branches \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "from_name": "main",
  "new_name": "development"
}
'
{
  "status": "<string>",
  "status_message": "<string>",
  "branch": {
    "commit_id": "<string>",
    "name": "<string>"
  },
  "oxen_version": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

namespace
string
required

Namespace of the repository

repo_name
string
required

Name of the repository

Body

application/json

Branch creation details. Can be created from another branch or a commit ID.

from_name
string
required
new_name
string
required

Response

Branch created

status
string
required
status_message
string
required
branch
object
required
oxen_version
string | null