BranchesDelete a branch

Delete a branch

Deletes a branch from the repository. The deployment branch cannot be deleted. Requires editor or admin role.

curl -X POST "https://api.documentationai.app/api/v1/branches/delete" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "branchName": "John Doe"
}'
{
  "deleted": "example_string"
}
POST
/branches/delete
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

Branch name to delete

Min length: 1
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

Branch name to delete

Responses

deletedstring

Name of the deleted branch