List Agent Branches
curl --request GET \
--url https://api.bland.ai/v2/agents/{agent_id}/branches \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/branches"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/agents/{agent_id}/branches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v2/agents/{agent_id}/branches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v2/agents/{agent_id}/branches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bland.ai/v2/agents/{agent_id}/branches")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/branches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "d403963c-b555-4911-8c29-d33e6268d844",
"agent_id": "fe16b944-1d94-46bd-ba4a-7360aa311ded",
"name": "billing-questions",
"base_version_id": "bdd5b157-7617-448a-850d-b799cb22c0a1",
"created_by": "a941d24e-f0ac-4d0b-82df-b1fe34bf1715",
"created_at": "2026-09-08T16:21:09.412Z",
"behind": true
},
{
"id": "fc323133-b2c7-49bf-9cf4-a35188caa10e",
"agent_id": "fe16b944-1d94-46bd-ba4a-7360aa311ded",
"name": "spanish-greeting",
"base_version_id": "b55be31f-dd53-4587-b4ba-1bf761ff7717",
"created_by": null,
"created_at": "2026-09-10T09:03:44.870Z",
"behind": false
}
],
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Agent not found"
}
]
}
Branches
List Agent Branches
List an agent’s open branches.
GET
/
v2
/
agents
/
{agent_id}
/
branches
List Agent Branches
curl --request GET \
--url https://api.bland.ai/v2/agents/{agent_id}/branches \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/branches"
headers = {"authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/agents/{agent_id}/branches', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v2/agents/{agent_id}/branches",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v2/agents/{agent_id}/branches"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.bland.ai/v2/agents/{agent_id}/branches")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/branches")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "d403963c-b555-4911-8c29-d33e6268d844",
"agent_id": "fe16b944-1d94-46bd-ba4a-7360aa311ded",
"name": "billing-questions",
"base_version_id": "bdd5b157-7617-448a-850d-b799cb22c0a1",
"created_by": "a941d24e-f0ac-4d0b-82df-b1fe34bf1715",
"created_at": "2026-09-08T16:21:09.412Z",
"behind": true
},
{
"id": "fc323133-b2c7-49bf-9cf4-a35188caa10e",
"agent_id": "fe16b944-1d94-46bd-ba4a-7360aa311ded",
"name": "spanish-greeting",
"base_version_id": "b55be31f-dd53-4587-b4ba-1bf761ff7717",
"created_by": null,
"created_at": "2026-09-10T09:03:44.870Z",
"behind": false
}
],
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Agent not found"
}
]
}
Overview
Returns the agent’s open branches (not yet merged or deleted), oldest first. A branch is a dev workspace cut from the dev head;behind tells you whether dev has moved past the branch’s base since it was cut. Create one with Create Agent Branch and land it with Merge Agent Branch.
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The agent’s unique identifier.
Response
array
Array of branch objects ordered by
created_at ascending. Empty when the agent has no open branches.Show branch object
Show branch object
string
Unique identifier for the branch.
string
The agent the branch belongs to.
string
The branch name.
string | null
The dev version the branch was cut from, or last rebased onto.
null when the branch was cut from an agent with no saved versions.string | null
ID of the user who created the branch, or
null when created with an org-level key.string
ISO 8601 timestamp of creation.
boolean
true when dev’s newest version is no longer the branch’s base. A merge returns 409 BRANCH_BEHIND until the branch is rebased.null | array
null on success, or a list of error objects if the request failed.{
"data": [
{
"id": "d403963c-b555-4911-8c29-d33e6268d844",
"agent_id": "fe16b944-1d94-46bd-ba4a-7360aa311ded",
"name": "billing-questions",
"base_version_id": "bdd5b157-7617-448a-850d-b799cb22c0a1",
"created_by": "a941d24e-f0ac-4d0b-82df-b1fe34bf1715",
"created_at": "2026-09-08T16:21:09.412Z",
"behind": true
},
{
"id": "fc323133-b2c7-49bf-9cf4-a35188caa10e",
"agent_id": "fe16b944-1d94-46bd-ba4a-7360aa311ded",
"name": "spanish-greeting",
"base_version_id": "b55be31f-dd53-4587-b4ba-1bf761ff7717",
"created_by": null,
"created_at": "2026-09-10T09:03:44.870Z",
"behind": false
}
],
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Agent not found"
}
]
}
Docs for agents: llms.txt
Was this page helpful?