Eval Agents
Publish Eval Agent
Publish the agent’s current draft as a new active version.
POST
/
v1
/
evals
/
agents
/
{eval_agent_id}
/
publications
Publish Eval Agent
curl --request POST \
--url https://api.bland.ai/v1/evals/agents/{eval_agent_id}/publications \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/evals/agents/{eval_agent_id}/publications"
headers = {"authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/evals/agents/{eval_agent_id}/publications', 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/v1/evals/agents/{eval_agent_id}/publications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/v1/evals/agents/{eval_agent_id}/publications"
req, _ := http.NewRequest("POST", 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.post("https://api.bland.ai/v1/evals/agents/{eval_agent_id}/publications")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/evals/agents/{eval_agent_id}/publications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"errors": null,
"data": {
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"current_version_id": "e5f6a7b8-c9d0-1234-efab-567890123456",
"active_version_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"published_version": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"version_number": 3,
"name": "Empathy Check v3",
"state": "archived",
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-15T08:00:00.000Z",
"latest_run": null
}
}
}
Headers
Path Parameters
Publishing validates the draft before snapshotting it. A graded agent must have between 2 and 5 levels, and every key in
target_level_keys must match a defined level. A pass/fail agent must have 0 levels and no target level keys set.Response
{
"errors": null,
"data": {
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"current_version_id": "e5f6a7b8-c9d0-1234-efab-567890123456",
"active_version_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"published_version": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"version_number": 3,
"name": "Empathy Check v3",
"state": "archived",
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-15T08:00:00.000Z",
"latest_run": null
}
}
}
Was this page helpful?
⌘I
Publish Eval Agent
curl --request POST \
--url https://api.bland.ai/v1/evals/agents/{eval_agent_id}/publications \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v1/evals/agents/{eval_agent_id}/publications"
headers = {"authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v1/evals/agents/{eval_agent_id}/publications', 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/v1/evals/agents/{eval_agent_id}/publications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/v1/evals/agents/{eval_agent_id}/publications"
req, _ := http.NewRequest("POST", 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.post("https://api.bland.ai/v1/evals/agents/{eval_agent_id}/publications")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/evals/agents/{eval_agent_id}/publications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"errors": null,
"data": {
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"current_version_id": "e5f6a7b8-c9d0-1234-efab-567890123456",
"active_version_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"published_version": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"version_number": 3,
"name": "Empathy Check v3",
"state": "archived",
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-15T08:00:00.000Z",
"latest_run": null
}
}
}