Test agent response guardrails
Run a transcript through the agent's response guardrails, the same check calls and chat make on each reply, and see which replies go out, which are blocked, and which break a guardrail and are regenerated. Put each line on its own line: a line that starts with 'Agent:' is a reply the agent wrote, and every other line is the caller. An 'Agent:' line before the caller's first line is what the agent last said and is not checked. Each later agent line reports action (speak, block, regenerate or fallback), reason (rule, inactive, error or timeout), the broken guardrail ids, the note the model would get when a reply is regenerated, every question's probability against its threshold, and how long the check took in ms. As on a call, a reply that goes out or is blocked starts a fresh caller turn for the next caller line, and a regenerated reply leaves the caller's words in it. With context tools set, pass contextResults with a realistic result for each one, or every reply reads inactive. jobContext replaces the saved static text for this test, and settings lays unsaved changes over the saved ones. Nothing is saved, no audio plays, no model runs and no tools run. Tests the current version unless versionId names another. configured false means this environment has no classifier key, so its calls are not checked either.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/operations/test_agent_response_guardrails" \ -H "Content-Type: application/json" \ -d '{ "transcript": "string", "agent": "string" }'{}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Sync phone number labels POST
Re-derive and write each carrier number's inventory labels (tags + customer_reference) for a workspace from the DB, the source of truth, repairing drift. Numbers bound to an agent get status_live plus customer/ws/agent/env tags; unbound numbers get status_spare. Numbers on any other provider and ones with no provider id are skipped. The assign hook already stamps a number on assignment; run this to fix historical or hand-edited numbers in bulk. Returns a per-number summary. This is the labels-only shortcut: `reconcile_phone_numbers` is the strict superset, it does this label re-stamp AND verifies each number's live voice-connection routing at the carrier and its deletion lock. Use reconcile when you care about routing correctness, this when you only need to repair labels.
Test evaluation trigger POST
Preview whether a metric's evaluation trigger would FIRE on a sample transcript, without running or saving anything. A metric's trigger gates when it runs: 'always' (the default, always fires) or 'custom' (a natural-language condition). For a custom condition this runs the SAME cheap yes/no judge the runtime uses at call time, so the preview matches what the engine would do. Use this to check a custom trigger before relying on it. Returns wouldFire (true/false), the trigger mode, and a plain-English explanation. The metric must be in the current workspace.