Skip to main content
POST
/
api
/
repos
/
{namespace}
/
{repo_name}
/
branches
Get a branch if it exists, create a new one if not
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": "my_branch"
}'
""

Authorizations

Authorization
string
header
required

Path Parameters

namespace
string
required
Example:
repo_name
string
required
Example:

Body

application/json
from_name
string
Example:
new_name
string
Example:

Response

200 - text/plain