Skip to main content
PATCH
Update case
Send only the fields you want to change. agent_id, persona_id, and suite_id are all patchable — each is re-validated for company ownership when supplied, so you can repoint a case at a different agent in place. The case keeps its existing run history regardless. A common pattern: tweak success_criteria after watching a few runs. Lower the weight on a flaky assertion, raise it on a load-bearing one, add a new must_not_say for a phrase you saw the agent leak.

Authorizations

Authorization
string
header
required

Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys.

Path Parameters

id
string<uuid>
required

Body

application/json
name
string
description
string | null
persona_id
string<uuid>
suite_id
string<uuid> | null
scenario
string
success_criteria
object[]
max_turns
integer
Required range: 1 <= x <= 100
pass_threshold
number
Required range: 0 <= x <= 100
agent_overrides
object | null
tool_policy
enum<string>
Available options:
mock,
real,
allowlist
tool_allowlist
string[]

Response

Updated case

A specific eval scenario — persona + target agent + scenario + success criteria.

id
string<uuid>
required
company_id
string<uuid>
required
agent_id
string<uuid>
required

Agent under test. Full agent record is expanded inline as agent in API responses.

persona_id
string<uuid>
required
name
string
required
Example:

"Yes path — caller agrees on first ask"

scenario
string
required

Free-form one-paragraph framing the persona LLM is given on top of its identity. Describe the situation that prompted the call.

Example:

"The persona is responding to a missed call from your business about their recent inquiry. They have time to talk for 5 minutes."

success_criteria
object[]
required

Array of assertions evaluated after the run completes.

max_turns
integer
default:20
required

Hard cap on conversation turns. Hitting this terminates the run with termination_reason='max_turns'.

Required range: 1 <= x <= 100
pass_threshold
number
default:80
required

Weighted-score threshold (0-100) for pass_fail=true.

Required range: 0 <= x <= 100
tool_policy
enum<string>
default:mock
required

How the agent's tools behave during the run. Applies to BOTH agent types — a flow agent's tool_call steps and the tools attached to a single-prompt agent, which the model calls directly. mock (default): webhook tools make no request — each returns the fixed synthetic result {"success": true, "status_code": 200}. The canonical request body is still assembled (so argument-resolution bugs still surface, and must_call_tool + args_match still assert against it), but target validation and the network hop are skipped, so mock does not prove the endpoint is reachable or acceptable. Because the synthetic body is fixed, a step whose transitions branch on the response CONTENT always takes its success edge under mock. real: tools fire for real (charges real money, hits real systems). allowlist: webhook tools matching an entry in tool_allowlist fire for real, the rest return the same synthetic success. Note that allowlist differentiates webhook tools ONLY — steps calling a connected app (Google Calendar, Gmail) dispatch for real under both real and allowlist, because those are gated separately and have no per-tool name to match on. Use mock to hold those back too. Hang-up and transfer tools are policy-independent: they make no request, so in a run they simply end it (a transfer never places a call to its destination).

Available options:
mock,
real,
allowlist
created_at
string<date-time>
required
agent
object
persona
object

Reusable caller archetype consumed by eval cases. The identity_prompt plus behavior_traits shape how the persona LLM responds; the same persona can be reused across many cases.

suite_id
string<uuid> | null

Optional parent suite. When null, the case is ad-hoc — runnable on its own but not part of a regression sweep.

description
string | null
agent_overrides
object | null

Optional per-case overrides applied to the agent's saved config at run time (e.g. a different system_prompt or flow_config for A/B testing). Same shape as the agent record. The agent on disk is never mutated. Configuration only: the identity fields id, company_id, company_timezone, tools and flow_tools are stored but ignored at run time — a run always executes as the agent's own workspace, with the tools that workspace resolved.

tool_allowlist
string[]

Used only when tool_policy='allowlist'. Entries match a tool's id or its name, exactly and case-sensitively. Prefer ids: tool names are not unique within a company, so a name arms every tool that shares it. An entry that matches nothing is mocked rather than fired — a typo fails safe, and shows in the run trace as dispatched: false.

updated_at
string<date-time>
deleted_at
string<date-time> | null