Approve or reject a run
curl --request POST \
--url https://api.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "<string>"
}
'import requests
url = "https://api.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}"
payload = { "note": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({note: '<string>'})
};
fetch('https://api.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}', 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.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}"
payload := strings.NewReader("{\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"approval": {
"id": "<string>",
"runId": "<string>",
"reason": "monthly_cap",
"status": "pending",
"estimatedCostUsd": 123,
"monthToDateUsd": 123,
"capUsd": 123,
"requestedBy": "<string>",
"decidedBy": "<string>",
"decisionNote": "<string>",
"decidedAt": "<string>",
"expiresAt": "<string>",
"createdAt": "<string>"
},
"run": {
"id": "<string>",
"benchmarkId": "<string>",
"number": 123,
"status": "awaiting_approval",
"cancelRequested": true,
"trigger": "ui",
"versionNumber": 123,
"isDraftRun": true,
"repeats": 123,
"totalCells": 123,
"completedCells": 123,
"passedCells": 123,
"failedCells": 123,
"erroredCells": 123,
"skippedCells": 123,
"candidates": [
{
"id": "<string>",
"label": "<string>",
"model": "<string>",
"agentVersionId": "<string>",
"agentVersionLabel": "<string>",
"isReference": true
}
],
"results": [
{
"candidateId": "<string>",
"passRate": 123,
"wer": 123,
"p50LatencyMs": 123,
"costUsd": 123
}
],
"estimatedCostUsd": 123,
"costCapUsd": 123,
"actualCostUsd": 123,
"caseSetHash": "<string>",
"failureReason": "<string>",
"createdBy": "<string>",
"createdByUser": {
"id": "<string>",
"name": "<string>",
"image": "<string>"
},
"createdAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>",
"rescoredAt": "<string>",
"approval": {
"id": "<string>",
"runId": "<string>",
"reason": "monthly_cap",
"status": "pending",
"estimatedCostUsd": 123,
"monthToDateUsd": 123,
"capUsd": 123,
"requestedBy": "<string>",
"decidedBy": "<string>",
"decisionNote": "<string>",
"decidedAt": "<string>",
"expiresAt": "<string>",
"createdAt": "<string>"
},
"publishedAsVersionNumber": 123
}
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"parameter": "<string>",
"unknown": [
"<string>"
],
"valid": [
"<string>"
],
"details": {}
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"parameter": "<string>",
"unknown": [
"<string>"
],
"valid": [
"<string>"
],
"details": {}
}{
"error": "validation_failed",
"code": "validation_failed",
"message": "<string>",
"hint": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"parameter": "<string>",
"unknown": [
"<string>"
],
"valid": [
"<string>"
],
"details": {}
}{
"error": "validation_failed",
"code": "validation_failed",
"message": "<string>",
"hint": "<string>",
"details": {}
}Benchmarks
Approve or reject a run
Owners only. The requester can’t approve their own run unless they are the organization’s only owner. Approving starts the run; requests expire after 7 days.
POST
/
v1
/
benchmarks
/
{id}
/
approvals
/
{approvalId}
Approve or reject a run
curl --request POST \
--url https://api.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"note": "<string>"
}
'import requests
url = "https://api.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}"
payload = { "note": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({note: '<string>'})
};
fetch('https://api.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}', 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.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}"
payload := strings.NewReader("{\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zelto.ai/v1/benchmarks/{id}/approvals/{approvalId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"approval": {
"id": "<string>",
"runId": "<string>",
"reason": "monthly_cap",
"status": "pending",
"estimatedCostUsd": 123,
"monthToDateUsd": 123,
"capUsd": 123,
"requestedBy": "<string>",
"decidedBy": "<string>",
"decisionNote": "<string>",
"decidedAt": "<string>",
"expiresAt": "<string>",
"createdAt": "<string>"
},
"run": {
"id": "<string>",
"benchmarkId": "<string>",
"number": 123,
"status": "awaiting_approval",
"cancelRequested": true,
"trigger": "ui",
"versionNumber": 123,
"isDraftRun": true,
"repeats": 123,
"totalCells": 123,
"completedCells": 123,
"passedCells": 123,
"failedCells": 123,
"erroredCells": 123,
"skippedCells": 123,
"candidates": [
{
"id": "<string>",
"label": "<string>",
"model": "<string>",
"agentVersionId": "<string>",
"agentVersionLabel": "<string>",
"isReference": true
}
],
"results": [
{
"candidateId": "<string>",
"passRate": 123,
"wer": 123,
"p50LatencyMs": 123,
"costUsd": 123
}
],
"estimatedCostUsd": 123,
"costCapUsd": 123,
"actualCostUsd": 123,
"caseSetHash": "<string>",
"failureReason": "<string>",
"createdBy": "<string>",
"createdByUser": {
"id": "<string>",
"name": "<string>",
"image": "<string>"
},
"createdAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>",
"rescoredAt": "<string>",
"approval": {
"id": "<string>",
"runId": "<string>",
"reason": "monthly_cap",
"status": "pending",
"estimatedCostUsd": 123,
"monthToDateUsd": 123,
"capUsd": 123,
"requestedBy": "<string>",
"decidedBy": "<string>",
"decisionNote": "<string>",
"decidedAt": "<string>",
"expiresAt": "<string>",
"createdAt": "<string>"
},
"publishedAsVersionNumber": 123
}
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"parameter": "<string>",
"unknown": [
"<string>"
],
"valid": [
"<string>"
],
"details": {}
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"parameter": "<string>",
"unknown": [
"<string>"
],
"valid": [
"<string>"
],
"details": {}
}{
"error": "validation_failed",
"code": "validation_failed",
"message": "<string>",
"hint": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"hint": "<string>",
"parameter": "<string>",
"unknown": [
"<string>"
],
"valid": [
"<string>"
],
"details": {}
}{
"error": "validation_failed",
"code": "validation_failed",
"message": "<string>",
"hint": "<string>",
"details": {}
}Authorizations
Send Authorization: Bearer YOUR_API_KEY. The key resolves to a single organization.
Body
application/json

