Set safety guardrails
Configure draft guardrails for calls and chat. Use replies over MCP because agent names the target agent. Omitted fields are preserved. Enabled categories check replies for harmful content before release, and action substitute replaces a caught reply with substituteLine. Business rules, such as never quoting a price, are not set here: use set_agent_response_guardrails. Action observe records detections and still releases the original; handoff and endCall retain their call actions. Caller promptAttack and action control incoming attack checks; countAttempt withholds attacks before generation or tools and ends a call on the third attempt. agent.steer is conversation guidance that shapes later replies on calls and cannot stop speech. Save changes to a draft, test ordinary and adversarial replies with test_guardrails, then publish to apply them to new conversations. Blocking guardrails require separate listening, reply and voice models. Tool permissions and endpoint authentication remain separate backend controls.
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/set_safety_guardrails" \ -H "Content-Type: application/json" \ -d '{ "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
}Set returning greeting POST
Pin the greeting spoken word-for-word to a returning caller the agent recognises by phone number (needs caller memory on). Distinct from set_greeting_message, which is the opener EVERY caller hears; this one fires only for a recognised repeat caller and can carry the {{caller_name}} token for the remembered name. Use when the operator says things like 'welcome returning callers back by name', 'greet repeat callers differently', or 'say Welcome back {{caller_name}} to people we know'. Pass null to clear it, so recognised callers hear the normal greeting. Applies to the current draft version.
Set scenario environment POST
Set the runtime environment (audio-degradation) knobs on a test-harness scenario, how degraded the line the simulated caller drives the agent over is. Knobs: backgroundNoiseLevel (0-1) raises or lowers the caller ambience, and when the persona has no ambience of its own it plays office ambience, so asking for noise always produces noise; networkLatencyMs (0-2000ms) adds one-way delay; audioQuality (0.2-1) attenuates the caller's audio, 1 = clean. Out-of-range values are clamped, not rejected. VOICE scenarios only, a text scenario ignores all of them. Send only what changes; omitting a knob (or sending an empty environment) leaves the caller on a clean line, the default reproduces today's caller exactly. This configures the TEST HARNESS caller only, it never changes how the agent itself behaves.