---
title: "List Agent Branches"
method: GET
path: "/v1/convai/agents/{agent_id}/branches"
tags: ["Agents Platform"]
---

# List Agent Branches

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

Returns a list of branches an agent has

## Path parameters

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

## Query parameters

- `include_archived` boolean — Whether archived branches should be included
- `limit` integer — How many results at most should be returned
- `include_commit_status` boolean — Whether to compute how far each branch has diverged from main (commits_ahead/commits_behind). This walks the version DAG of every branch, so it is slow on agents with long histories and is off by default, leaving those fields null.

## 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.

## Response `200`

Successful Response

- ListResponseAgentBranchSummary
  - `meta` ListResponseMeta
    - `total` integer, nullable
    - `page` integer, nullable
    - `page_size` integer, nullable
  - `results` AgentBranchSummary[], required
    - `id` string, required
    - `name` string, required
    - `agent_id` string, required
    - `description` string, required
    - `created_at` integer, required
    - `last_committed_at` integer, required
    - `is_archived` boolean, required
    - `protection_status` 'writer_perms_required' | 'admin_perms_required'
    - `access_info` ResourceAccessInfo
      - `is_creator` boolean, required — Whether the user making the request is the creator of the agent
      - `creator_name` string, required — Name of the agent's creator
      - `creator_email` string, required — Email of the agent's creator
      - `role` 'admin' | 'editor' | 'commenter' | 'viewer', required — The role of the user making the request
      - `anonymous_access_level_override` 'admin' | 'editor' | 'commenter' | 'viewer', nullable — The access level for anonymous users. If None, the resource is not shared publicly.
      - `access_source` 'creator' | 'explicit' | 'workspace_admin' | 'workspace_default', nullable — Why the requesting user has access to this resource. 'creator' = caller is the owner. 'explicit' = caller (or one of their workspace groups) is listed in role_to_group_ids beyond the workspace-wide everyone group. 'workspace_default' = the workspace-wide everyone group is listed in role_to_group_ids (every non-anon workspace member, including admins, sees this resource). 'workspace_admin' = caller is a workspace admin and the admin seat is the *only* path to access; reserved for docs nobody else can see. Lets the UI disclose why an admin-bypass viewer sees a doc that wasn't explicitly shared with them.
    - `current_live_percentage` number — Percentage of traffic live on the branch
    - `parent_branch_id` string, nullable — ID of the parent branch
    - `draft_exists` boolean — Whether a draft exists for the branch
    - `calls_7d` integer — Number of calls in the last 7 days
    - `commits_ahead` integer, nullable — Number of commits on this branch not yet on main, relative to their common ancestor. Null if it could not be computed (e.g. no common ancestor, or the branch history exceeds the comparison budget).
    - `commits_behind` integer, nullable — Number of commits on main not yet incorporated into this branch, relative to their common ancestor. Null if it could not be computed (e.g. no common ancestor, or the branch history exceeds the comparison budget).
    - `merged_into_branch_id` string, nullable — ID of the branch this branch's tip version was merged into, if any

## 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/57d56f34628a/schema)
