POST
/
repos
/
{repo_id}
/
branches
curl --request POST \
  --url https://api.diversion.dev/v0/repos/{repo_id}/branches \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "commit_id": "example_id",
  "branch_name": "new-branch-name",
  "branch_description": "A description of the branch"
}'
{
  "id": "example_id"
}

Authorizations

Authorization
string
header
required

This API uses OAuth 2 with the implicit grant flow

Path Parameters

repo_id
string
required

The repo ID of the repository. Repo name can be used instead of the ID, but usage of ID for permanent linking and API requests is preferred.

Required string length: 3 - 128

Body

application/json
commit_id
string
required
Required string length: 3 - 128
branch_name
string
required
Required string length: 1 - 128
branch_description
string

Response

201
application/json
Resource created
id
string
required

The id of the newly created resource