Create Branch
POSThttps://api.confident-ai.com/v1/prompts/{alias}/branches
Creates a new branch with the specified name diverging from the main branch's head commit of your prompt.
curl -X POST "https://api.confident-ai.com/v1/prompts/{alias}/branches" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"branch": "NewBranch"
}'{
"success": true,
"data": {
"name": "NewBranch",
"id": "br_123456"
},
"link": "https://app.confident-ai.com/project/<PROJECT_ID>/prompt-studio/<PROMPT_ID>?branch=NewBranch",
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
aliasstringRequiredThe unique alias of the prompt.
Request body
branchstringRequiredThe unique name of the branch to create in the prompt.
Response
successbooleanThis is true if the prompt branch was successfully created.
dataobjectShow 2 propertiesHide 2 properties
namestringThis is the name of the newly created prompt branch.
idstringThis is the ID of the newly created prompt branch.
linkstringThis is the URL to the prompt branch on the Confident AI platform.
deprecatedbooleanThis is true if this endpoint is deprecated.