BranchesMerge branches

Merge branches

Merges one branch into another. If the target branch is the deployment branch, this triggers a live deployment.

curl -X POST "https://api.documentationai.app/api/v1/branches/merge" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "base": "main",
  "head": "feature/new-docs",
  "commitMessage": "example_string"
}'
{
  "commitSha": "example_string",
  "status": 42
}
POST
/branches/merge
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
basestring
Required

Target branch to merge into

Min length: 1
headstring
Required

Source branch to merge from

Min length: 1
commitMessagestring

Merge commit message

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
basestring
Required

Target branch to merge into

headstring
Required

Source branch to merge from

commitMessagestring

Merge commit message

Responses

commitShastring
statusinteger