Get Latest Agent Version
curl --request GET \
--url https://api.bland.ai/v2/agents/{agent_id}/versions/latest \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/versions/latest"
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}/versions/latest', 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}/versions/latest",
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}/versions/latest"
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}/versions/latest")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/versions/latest")
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": "947368cd-ea03-48e1-8d14-84f62a1be090",
"org_id": "4afedeaf-2bb5-4646-91d5-cb2b8d5e6bf2",
"agent_id": "9f242ae9-7d90-49df-8bd9-8450a97f1504",
"branch_id": null,
"snapshot": {
"behavior": {
"nodes": [
{
"id": "3da34a58-ddf3-4571-b060-4cfd7787a8f5",
"type": "start",
"position": { "x": 0, "y": 0 },
"data": {}
},
{
"id": "c0b9fdb4-62e6-4950-a099-bc24604555c1",
"type": "scenario",
"position": { "x": 320, "y": 0 },
"data": {
"name": "Reschedule",
"rule": "Find the caller's existing appointment and offer the next three open slots.",
"target": { "kind": "dialogue", "label": "Reschedule" },
"loopWhile": "",
"variables": [],
"entry": {
"mode": "llm",
"label": "Caller wants to move an appointment",
"description": "",
"alwaysPick": false,
"conditions": []
}
}
}
],
"edges": [
{
"id": "74c3c224-a701-44ea-bf53-fef3f6028dc1",
"source": "3da34a58-ddf3-4571-b060-4cfd7787a8f5",
"target": "c0b9fdb4-62e6-4950-a099-bc24604555c1"
}
]
},
"settings": {
"displayName": "Front desk",
"systemPrompt": "You are the front desk assistant for a dental clinic.",
"languages": ["en"],
"enableMemory": false,
"backgroundNoise": "off"
},
"contact": {
"inboundNumbers": ["+14155550123"]
},
"knowledge": {
"kbIds": []
}
},
"name": null,
"created_via": "autosave",
"revision": 4,
"created_by": "174ee50e-166c-41ff-8aa0-7c44ebb6e832",
"created_at": "2026-09-10T23:41:07.902Z"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NO_VERSIONS",
"message": "Agent has no versions yet"
}
]
}
{
"data": null,
"errors": [
{
"error": "BRANCH_NOT_FOUND",
"message": "Branch not found"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Agent not found"
}
]
}
Versions
Get Latest Agent Version
Retrieve the newest saved version with its full snapshot.
GET
/
v2
/
agents
/
{agent_id}
/
versions
/
latest
Get Latest Agent Version
curl --request GET \
--url https://api.bland.ai/v2/agents/{agent_id}/versions/latest \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/versions/latest"
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}/versions/latest', 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}/versions/latest",
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}/versions/latest"
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}/versions/latest")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/versions/latest")
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": "947368cd-ea03-48e1-8d14-84f62a1be090",
"org_id": "4afedeaf-2bb5-4646-91d5-cb2b8d5e6bf2",
"agent_id": "9f242ae9-7d90-49df-8bd9-8450a97f1504",
"branch_id": null,
"snapshot": {
"behavior": {
"nodes": [
{
"id": "3da34a58-ddf3-4571-b060-4cfd7787a8f5",
"type": "start",
"position": { "x": 0, "y": 0 },
"data": {}
},
{
"id": "c0b9fdb4-62e6-4950-a099-bc24604555c1",
"type": "scenario",
"position": { "x": 320, "y": 0 },
"data": {
"name": "Reschedule",
"rule": "Find the caller's existing appointment and offer the next three open slots.",
"target": { "kind": "dialogue", "label": "Reschedule" },
"loopWhile": "",
"variables": [],
"entry": {
"mode": "llm",
"label": "Caller wants to move an appointment",
"description": "",
"alwaysPick": false,
"conditions": []
}
}
}
],
"edges": [
{
"id": "74c3c224-a701-44ea-bf53-fef3f6028dc1",
"source": "3da34a58-ddf3-4571-b060-4cfd7787a8f5",
"target": "c0b9fdb4-62e6-4950-a099-bc24604555c1"
}
]
},
"settings": {
"displayName": "Front desk",
"systemPrompt": "You are the front desk assistant for a dental clinic.",
"languages": ["en"],
"enableMemory": false,
"backgroundNoise": "off"
},
"contact": {
"inboundNumbers": ["+14155550123"]
},
"knowledge": {
"kbIds": []
}
},
"name": null,
"created_via": "autosave",
"revision": 4,
"created_by": "174ee50e-166c-41ff-8aa0-7c44ebb6e832",
"created_at": "2026-09-10T23:41:07.902Z"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NO_VERSIONS",
"message": "Agent has no versions yet"
}
]
}
{
"data": null,
"errors": [
{
"error": "BRANCH_NOT_FOUND",
"message": "Branch not found"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Agent not found"
}
]
}
Overview
Returns the head of the agent’s dev timeline, including the full configuration snapshot. Passbranch to read a branch’s head instead; a branch with no saves of its own returns the version it was cut from. Use the returned id and revision as parent_version_id and parent_revision in Create Agent Version to save safely on top of it.
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The agent’s unique identifier. A fresh agent with no saved versions returns
404 NO_VERSIONS.Query Parameters
string
An open branch’s ID. Returns that branch’s newest save, falling back to its base version when the branch has none. Returns
404 BRANCH_NOT_FOUND if the branch is not open or does not belong to this agent.Response
object
The newest version, with its snapshot.
Show version object
Show version object
string
Unique identifier for the version.
string
The organization that owns the agent.
string
The agent this version belongs to.
string | null
The branch the version was saved onto, or
null on the dev timeline. When branch falls back to the base version, this is null because the base lives on the dev timeline.object
The saved configuration:
behavior (the node and edge graph), settings (agent-wide options), contact (inboundNumbers), and knowledge (kbIds) when present.string | null
The version’s display name, or
null if none was given.string
manual or autosave.integer
Incremented each time an autosave rewrites this row in place. Send it back as
parent_revision when saving.string | null
ID of the user who saved the version, or
null when saved with an org-level key.string
ISO 8601 timestamp of the first write.
null | array
null on success, or a list of error objects if the request failed.{
"data": {
"id": "947368cd-ea03-48e1-8d14-84f62a1be090",
"org_id": "4afedeaf-2bb5-4646-91d5-cb2b8d5e6bf2",
"agent_id": "9f242ae9-7d90-49df-8bd9-8450a97f1504",
"branch_id": null,
"snapshot": {
"behavior": {
"nodes": [
{
"id": "3da34a58-ddf3-4571-b060-4cfd7787a8f5",
"type": "start",
"position": { "x": 0, "y": 0 },
"data": {}
},
{
"id": "c0b9fdb4-62e6-4950-a099-bc24604555c1",
"type": "scenario",
"position": { "x": 320, "y": 0 },
"data": {
"name": "Reschedule",
"rule": "Find the caller's existing appointment and offer the next three open slots.",
"target": { "kind": "dialogue", "label": "Reschedule" },
"loopWhile": "",
"variables": [],
"entry": {
"mode": "llm",
"label": "Caller wants to move an appointment",
"description": "",
"alwaysPick": false,
"conditions": []
}
}
}
],
"edges": [
{
"id": "74c3c224-a701-44ea-bf53-fef3f6028dc1",
"source": "3da34a58-ddf3-4571-b060-4cfd7787a8f5",
"target": "c0b9fdb4-62e6-4950-a099-bc24604555c1"
}
]
},
"settings": {
"displayName": "Front desk",
"systemPrompt": "You are the front desk assistant for a dental clinic.",
"languages": ["en"],
"enableMemory": false,
"backgroundNoise": "off"
},
"contact": {
"inboundNumbers": ["+14155550123"]
},
"knowledge": {
"kbIds": []
}
},
"name": null,
"created_via": "autosave",
"revision": 4,
"created_by": "174ee50e-166c-41ff-8aa0-7c44ebb6e832",
"created_at": "2026-09-10T23:41:07.902Z"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NO_VERSIONS",
"message": "Agent has no versions yet"
}
]
}
{
"data": null,
"errors": [
{
"error": "BRANCH_NOT_FOUND",
"message": "Branch not found"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Agent not found"
}
]
}
Docs for agents: llms.txt
Was this page helpful?