For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Trust CenterStatusSupportGet a demoPlatform
DocumentationEvals API ReferenceIntegrations & OTELPlatform SettingsSelf-HostingGuidesChangelog
DocumentationEvals API ReferenceIntegrations & OTELPlatform SettingsSelf-HostingGuidesChangelog
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
    • Data Models
    • API Conventions
  • Data Models
      • GETList Prompts
      • POSTPush Prompts
        • GETList Branches
        • POSTCreate Branch
        • PUTUpdate Branch
        • DELDelete Branch
  • Evals
  • Legacy
LogoLogo
Trust CenterStatusSupportGet a demoPlatform
Data ModelsPromptsBranches

Create Branch

POST
https://api.confident-ai.com/v1/prompts/:alias/branches
POST
/v1/prompts/:alias/branches
$curl -X POST https://api.confident-ai.com/v1/prompts/PROMPT-ALIAS/branches \
> -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
> -H "Content-Type: application/json"
200With-Hash
1{
2 "success": true,
3 "data": {
4 "name": "NewBranch",
5 "id": "br_123456"
6 },
7 "link": "https://app.confident-ai.com/project/<PROJECT_ID>/prompt-studio/<PROMPT_ID>?branch=NewBranch",
8 "deprecated": false
9}
Creates a new branch with the specified name diverging from the main branch's head commit of your prompt.
Was this page helpful?
Previous

Update Branch

Next
Built with

Path parameters

aliasstringRequired
The unique alias of the prompt.

Headers

CONFIDENT_API_KEYstringRequired
The API key of your Confident AI project.

Request

branchstringRequired
The unique name of the branch to create in the prompt.

Response

successboolean
This is true if the prompt branch was successfully created.
dataobject
linkstring
This is the URL to the prompt branch on the Confident AI platform.
deprecatedboolean
This is true if this endpoint is deprecated.