---
title: "Create A New Branch"
method: POST
path: "/v1/convai/agents/{agent_id}/branches"
tags: ["Agents Platform"]
---

# Create A New Branch

`POST /v1/convai/agents/{agent_id}/branches`

Create a new branch from a given version of any branch

## Path parameters

- `agent_id` string, required — The id of an agent. This is returned on agent creation.

## Headers

- `xi-api-key` string, nullable — Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Request body

- BodyCreateANewBranchV1ConvaiAgentsAgentIdBranchesPost
  - `parent_version_id` string, required — ID of the version to branch from
  - `name` string, required — Name of the branch. It is unique within the agent.
  - `description` string, required — Description for the branch
  - `conversation_config` object, nullable — Changes to apply to conversation config
  - `platform_settings` object, nullable — Changes to apply to platform settings
  - `workflow` AgentWorkflowRequestModel
    - `edges` object
    - `nodes` object
    - `prevent_subagent_loops` boolean — Whether to prevent loops in the workflow execution.

## Response `200`

Successful Response

- CreateAgentBranchResponseModel
  - `created_branch_id` string, required — ID of the created branch
  - `created_version_id` string, required — ID of the first version on the created branch

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation.md) · [All operations](https://skmtc.net/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elevenlabs/elevenlabs-api-documentation/revisions/e77a0a530a82/schema)
