BranchesCreate a branch

Create a branch

Creates a new Git branch in the documentation repository. Requires editor or admin role.

curl -X POST "https://api.documentationai.app/api/v1/branches" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "branchName": "feature/new-docs",
  "sourceBranch": "example_string"
}'
{
  "branchName": "John Doe",
  "sourceBranch": "example_string",
  "sourceSha": "example_string"
}
POST
/branches
POST
Bearer Token
Bearer Tokenstring
Required

API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...

API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...
Content-Typestring
Required

The media type of the request body

Options: application/json
branchNamestring
Required

Name for the new branch

Min length: 1
sourceBranchstring

Branch to create from. Defaults to the deployment branch.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. API key generated from the Documentation.AI dashboard (Settings → API Keys). Pass as Authorization: Bearer dai_...

Body

application/json
branchNamestring
Required

Name for the new branch

sourceBranchstring

Branch to create from. Defaults to the deployment branch.

Responses