curl
curl -X PATCH "https://api.signalmd.dev/v1/agents/6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b/tests/3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f" \
-H "Authorization: Bearer $SIGNAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"spec":{"specVersion":1,"source":{"kind":"custom","basedOnTestId":null,"basedOnCallId":null},"caller":{"persona":"golden-cooperative","goal":"Ask what the cancellation policy is","lines":["What is your cancellation policy?"],"behaviours":[]},"fixtures":{"lookup_policy":[{"response":{"policy":"Free cancellation up to 24 hours before."}}]},"criteria":[{"text":"The agent states the cancellation window","decidedBy":"judge"}]}}'import requests
url = "https://api.signalmd.dev/v1/agents/{agentId}/tests/{testId}"
payload = { "spec": {
"specVersion": 1,
"source": {
"kind": "custom",
"basedOnTestId": None,
"basedOnCallId": None
},
"caller": {
"persona": "golden-cooperative",
"goal": "Ask what the cancellation policy is",
"lines": ["What is your cancellation policy?"],
"behaviours": []
},
"fixtures": { "lookup_policy": [{ "response": { "policy": "Free cancellation up to 24 hours before." } }] },
"criteria": [
{
"text": "The agent states the cancellation window",
"decidedBy": "judge"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
spec: {
specVersion: 1,
source: {kind: 'custom', basedOnTestId: null, basedOnCallId: null},
caller: {
persona: 'golden-cooperative',
goal: 'Ask what the cancellation policy is',
lines: ['What is your cancellation policy?'],
behaviours: []
},
fixtures: {
lookup_policy: [{response: {policy: 'Free cancellation up to 24 hours before.'}}]
},
criteria: [{text: 'The agent states the cancellation window', decidedBy: 'judge'}]
}
})
};
fetch('https://api.signalmd.dev/v1/agents/{agentId}/tests/{testId}', 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.signalmd.dev/v1/agents/{agentId}/tests/{testId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'spec' => [
'specVersion' => 1,
'source' => [
'kind' => 'custom',
'basedOnTestId' => null,
'basedOnCallId' => null
],
'caller' => [
'persona' => 'golden-cooperative',
'goal' => 'Ask what the cancellation policy is',
'lines' => [
'What is your cancellation policy?'
],
'behaviours' => [
]
],
'fixtures' => [
'lookup_policy' => [
[
'response' => [
'policy' => 'Free cancellation up to 24 hours before.'
]
]
]
],
'criteria' => [
[
'text' => 'The agent states the cancellation window',
'decidedBy' => 'judge'
]
]
]
]),
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.signalmd.dev/v1/agents/{agentId}/tests/{testId}"
payload := strings.NewReader("{\n \"spec\": {\n \"specVersion\": 1,\n \"source\": {\n \"kind\": \"custom\",\n \"basedOnTestId\": null,\n \"basedOnCallId\": null\n },\n \"caller\": {\n \"persona\": \"golden-cooperative\",\n \"goal\": \"Ask what the cancellation policy is\",\n \"lines\": [\n \"What is your cancellation policy?\"\n ],\n \"behaviours\": []\n },\n \"fixtures\": {\n \"lookup_policy\": [\n {\n \"response\": {\n \"policy\": \"Free cancellation up to 24 hours before.\"\n }\n }\n ]\n },\n \"criteria\": [\n {\n \"text\": \"The agent states the cancellation window\",\n \"decidedBy\": \"judge\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.signalmd.dev/v1/agents/{agentId}/tests/{testId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"spec\": {\n \"specVersion\": 1,\n \"source\": {\n \"kind\": \"custom\",\n \"basedOnTestId\": null,\n \"basedOnCallId\": null\n },\n \"caller\": {\n \"persona\": \"golden-cooperative\",\n \"goal\": \"Ask what the cancellation policy is\",\n \"lines\": [\n \"What is your cancellation policy?\"\n ],\n \"behaviours\": []\n },\n \"fixtures\": {\n \"lookup_policy\": [\n {\n \"response\": {\n \"policy\": \"Free cancellation up to 24 hours before.\"\n }\n }\n ]\n },\n \"criteria\": [\n {\n \"text\": \"The agent states the cancellation window\",\n \"decidedBy\": \"judge\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.signalmd.dev/v1/agents/{agentId}/tests/{testId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"spec\": {\n \"specVersion\": 1,\n \"source\": {\n \"kind\": \"custom\",\n \"basedOnTestId\": null,\n \"basedOnCallId\": null\n },\n \"caller\": {\n \"persona\": \"golden-cooperative\",\n \"goal\": \"Ask what the cancellation policy is\",\n \"lines\": [\n \"What is your cancellation policy?\"\n ],\n \"behaviours\": []\n },\n \"fixtures\": {\n \"lookup_policy\": [\n {\n \"response\": {\n \"policy\": \"Free cancellation up to 24 hours before.\"\n }\n }\n ]\n },\n \"criteria\": [\n {\n \"text\": \"The agent states the cancellation window\",\n \"decidedBy\": \"judge\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "test",
"id": "3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"title": "Books a cleaning when the lookup is slow",
"source": "production",
"lane": "integrations",
"intentSlug": "book_appointment",
"tier": "text",
"sourceCallId": "0b9e8d7c-6f5a-4b3c-9d2e-1f0a9b8c7d6e",
"sourceIssueKey": "tool_timeout:check_availability",
"persona": {
"slug": "@source",
"label": "The call's own caller"
},
"revision": 2,
"state": "accepted",
"acceptedAt": "2026-09-20T16:12:00.000Z",
"criteriaApprovedAt": "2026-09-20T16:12:00.000Z",
"expect": "pass",
"guard": false,
"gates": true,
"gateReason": "Calibrated: reproduces the failure on version 7 and passes on 8.",
"written": true,
"calibration": {
"state": "stable",
"expect": "pass",
"version": 8,
"k": 3,
"n": 3,
"results": [
"passed",
"passed",
"passed"
],
"runId": "d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a",
"revision": 2,
"epoch": {
"simulatorModel": "caller-setup-a",
"judgeModel": "review-setup-a",
"judgePromptHash": "9f2c1a7e",
"scorerVersion": "2026-09-18"
},
"at": "2026-10-02T11:07:41.000Z",
"reason": "Passed every run on version 8."
},
"inRelease": true,
"testSets": [
{
"id": "c7d8e9f0-a1b2-4c3d-8e4f-5a6b7c8d9e0f",
"name": "Release"
}
],
"tags": [
"booking"
],
"criteriaCount": 2,
"fixtureCounts": {
"total": 1,
"recorded": 1,
"fromOtherCall": 0,
"ownerSet": 0,
"none": 0
},
"lastAttempt": {
"result": "passed",
"startedAt": "2026-10-02T11:01:15.000Z"
},
"autoImprove": {
"status": "ready",
"label": "Ready for calls",
"active": false,
"updatedAt": "2026-09-28T09:44:02.000Z"
},
"archivedAt": null,
"createdAt": "2026-09-20T16:12:00.000Z",
"updatedAt": "2026-09-28T09:40:31.000Z"
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}Tests
Replace a test's spec
Replaces what the spec covers and makes a new revision. An edit that changes what is played or checked clears the calibration, so the test stops gating until calibrated again. An archived test is refused (422). Once a person approved the test’s criteria, a change to any criterion (rewording included) is refused with 409 criteria_locked and filed as a pending criteria proposal (error.proposalId); nothing is stored. Harness changes (caller, fixtures, start variables) still make a new revision.
PATCH
/
v1
/
agents
/
{agentId}
/
tests
/
{testId}
curl
curl -X PATCH "https://api.signalmd.dev/v1/agents/6f1d2c3b-4a5e-4f60-8b7a-9c0d1e2f3a4b/tests/3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f" \
-H "Authorization: Bearer $SIGNAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"spec":{"specVersion":1,"source":{"kind":"custom","basedOnTestId":null,"basedOnCallId":null},"caller":{"persona":"golden-cooperative","goal":"Ask what the cancellation policy is","lines":["What is your cancellation policy?"],"behaviours":[]},"fixtures":{"lookup_policy":[{"response":{"policy":"Free cancellation up to 24 hours before."}}]},"criteria":[{"text":"The agent states the cancellation window","decidedBy":"judge"}]}}'import requests
url = "https://api.signalmd.dev/v1/agents/{agentId}/tests/{testId}"
payload = { "spec": {
"specVersion": 1,
"source": {
"kind": "custom",
"basedOnTestId": None,
"basedOnCallId": None
},
"caller": {
"persona": "golden-cooperative",
"goal": "Ask what the cancellation policy is",
"lines": ["What is your cancellation policy?"],
"behaviours": []
},
"fixtures": { "lookup_policy": [{ "response": { "policy": "Free cancellation up to 24 hours before." } }] },
"criteria": [
{
"text": "The agent states the cancellation window",
"decidedBy": "judge"
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
spec: {
specVersion: 1,
source: {kind: 'custom', basedOnTestId: null, basedOnCallId: null},
caller: {
persona: 'golden-cooperative',
goal: 'Ask what the cancellation policy is',
lines: ['What is your cancellation policy?'],
behaviours: []
},
fixtures: {
lookup_policy: [{response: {policy: 'Free cancellation up to 24 hours before.'}}]
},
criteria: [{text: 'The agent states the cancellation window', decidedBy: 'judge'}]
}
})
};
fetch('https://api.signalmd.dev/v1/agents/{agentId}/tests/{testId}', 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.signalmd.dev/v1/agents/{agentId}/tests/{testId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'spec' => [
'specVersion' => 1,
'source' => [
'kind' => 'custom',
'basedOnTestId' => null,
'basedOnCallId' => null
],
'caller' => [
'persona' => 'golden-cooperative',
'goal' => 'Ask what the cancellation policy is',
'lines' => [
'What is your cancellation policy?'
],
'behaviours' => [
]
],
'fixtures' => [
'lookup_policy' => [
[
'response' => [
'policy' => 'Free cancellation up to 24 hours before.'
]
]
]
],
'criteria' => [
[
'text' => 'The agent states the cancellation window',
'decidedBy' => 'judge'
]
]
]
]),
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.signalmd.dev/v1/agents/{agentId}/tests/{testId}"
payload := strings.NewReader("{\n \"spec\": {\n \"specVersion\": 1,\n \"source\": {\n \"kind\": \"custom\",\n \"basedOnTestId\": null,\n \"basedOnCallId\": null\n },\n \"caller\": {\n \"persona\": \"golden-cooperative\",\n \"goal\": \"Ask what the cancellation policy is\",\n \"lines\": [\n \"What is your cancellation policy?\"\n ],\n \"behaviours\": []\n },\n \"fixtures\": {\n \"lookup_policy\": [\n {\n \"response\": {\n \"policy\": \"Free cancellation up to 24 hours before.\"\n }\n }\n ]\n },\n \"criteria\": [\n {\n \"text\": \"The agent states the cancellation window\",\n \"decidedBy\": \"judge\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.signalmd.dev/v1/agents/{agentId}/tests/{testId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"spec\": {\n \"specVersion\": 1,\n \"source\": {\n \"kind\": \"custom\",\n \"basedOnTestId\": null,\n \"basedOnCallId\": null\n },\n \"caller\": {\n \"persona\": \"golden-cooperative\",\n \"goal\": \"Ask what the cancellation policy is\",\n \"lines\": [\n \"What is your cancellation policy?\"\n ],\n \"behaviours\": []\n },\n \"fixtures\": {\n \"lookup_policy\": [\n {\n \"response\": {\n \"policy\": \"Free cancellation up to 24 hours before.\"\n }\n }\n ]\n },\n \"criteria\": [\n {\n \"text\": \"The agent states the cancellation window\",\n \"decidedBy\": \"judge\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.signalmd.dev/v1/agents/{agentId}/tests/{testId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"spec\": {\n \"specVersion\": 1,\n \"source\": {\n \"kind\": \"custom\",\n \"basedOnTestId\": null,\n \"basedOnCallId\": null\n },\n \"caller\": {\n \"persona\": \"golden-cooperative\",\n \"goal\": \"Ask what the cancellation policy is\",\n \"lines\": [\n \"What is your cancellation policy?\"\n ],\n \"behaviours\": []\n },\n \"fixtures\": {\n \"lookup_policy\": [\n {\n \"response\": {\n \"policy\": \"Free cancellation up to 24 hours before.\"\n }\n }\n ]\n },\n \"criteria\": [\n {\n \"text\": \"The agent states the cancellation window\",\n \"decidedBy\": \"judge\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"object": "test",
"id": "3f1c2d4e-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
"title": "Books a cleaning when the lookup is slow",
"source": "production",
"lane": "integrations",
"intentSlug": "book_appointment",
"tier": "text",
"sourceCallId": "0b9e8d7c-6f5a-4b3c-9d2e-1f0a9b8c7d6e",
"sourceIssueKey": "tool_timeout:check_availability",
"persona": {
"slug": "@source",
"label": "The call's own caller"
},
"revision": 2,
"state": "accepted",
"acceptedAt": "2026-09-20T16:12:00.000Z",
"criteriaApprovedAt": "2026-09-20T16:12:00.000Z",
"expect": "pass",
"guard": false,
"gates": true,
"gateReason": "Calibrated: reproduces the failure on version 7 and passes on 8.",
"written": true,
"calibration": {
"state": "stable",
"expect": "pass",
"version": 8,
"k": 3,
"n": 3,
"results": [
"passed",
"passed",
"passed"
],
"runId": "d1e2f3a4-b5c6-4d7e-8f9a-0b1c2d3e4f5a",
"revision": 2,
"epoch": {
"simulatorModel": "caller-setup-a",
"judgeModel": "review-setup-a",
"judgePromptHash": "9f2c1a7e",
"scorerVersion": "2026-09-18"
},
"at": "2026-10-02T11:07:41.000Z",
"reason": "Passed every run on version 8."
},
"inRelease": true,
"testSets": [
{
"id": "c7d8e9f0-a1b2-4c3d-8e4f-5a6b7c8d9e0f",
"name": "Release"
}
],
"tags": [
"booking"
],
"criteriaCount": 2,
"fixtureCounts": {
"total": 1,
"recorded": 1,
"fromOtherCall": 0,
"ownerSet": 0,
"none": 0
},
"lastAttempt": {
"result": "passed",
"startedAt": "2026-10-02T11:01:15.000Z"
},
"autoImprove": {
"status": "ready",
"label": "Ready for calls",
"active": false,
"updatedAt": "2026-09-28T09:44:02.000Z"
},
"archivedAt": null,
"createdAt": "2026-09-20T16:12:00.000Z",
"updatedAt": "2026-09-28T09:40:31.000Z"
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}{
"error": {
"type": "not_found_error",
"code": "agent_not_found",
"message": "Agent not found.",
"param": null,
"requestId": "req_8c1f0e2b4a6d9e3f7a5c1b0d"
}
}Authorizations
Path Parameters
Body
application/json
Response
The test as stored.
Was this page helpful?