Skip to main content
PUT
/
v1
/
agent-testing
/
scenarios
/
{id}
Update Test Scenario
curl --request PUT \
  --url https://api.bland.ai/v1/agent-testing/scenarios/{id} \
  --header 'Content-Type: application/json' \
  --header 'authorization: <authorization>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "category": "<string>",
  "scenario_type": "<string>",
  "tester_persona_prompt": "<string>",
  "tester_persona_name": "<string>",
  "max_turns": 123,
  "request_data": {},
  "start_node_id": "<string>",
  "bland_tone_enabled": true,
  "is_required_for_promotion": true,
  "enabled": true,
  "input_messages": [
    {}
  ],
  "advanced_instructions": "<string>",
  "metadata": {},
  "assertions": [
    {
      "type": "<string>",
      "config": {},
      "name": "<string>",
      "is_required": true,
      "weight": 123,
      "order": 123
    }
  ]
}
'
{
  "id": "a1b2c3d4-5678-9abc-def0-1234567890ab",
  "org_id": "b2c3d4e5-6789-abcd-ef01-234567890abc",
  "pathway_id": "c3d4e5f6-789a-bcde-f012-34567890abcd",
  "persona_id": null,
  "name": "Angry Caller Test - Updated",
  "description": "Tests the agent's ability to de-escalate an angry caller with updated assertions",
  "category": "ANGRY_CALLER",
  "scenario_type": "AGENT",
  "tester_persona_prompt": "You are a frustrated customer who has been waiting on hold for 30 minutes. You are upset about a billing error on your account.",
  "tester_persona_name": "Frustrated Customer",
  "max_turns": 20,
  "request_data": null,
  "start_node_id": null,
  "bland_tone_enabled": true,
  "is_required_for_promotion": true,
  "enabled": true,
  "input_messages": null,
  "advanced_instructions": null,
  "metadata": null,
  "assertions": [
    {
      "id": "d4e5f6a7-89ab-cdef-0123-4567890abcde",
      "type": "LLM_JUDGE",
      "name": "De-escalation",
      "config": {
        "prompt": "Did the agent successfully de-escalate the situation and address the customer's concerns?",
        "output_type": "score",
        "threshold": 0.8
      },
      "is_required": true,
      "weight": 1.5,
      "order": 0
    },
    {
      "id": "e5f6a7b8-9abc-def0-1234-567890abcdef",
      "type": "NODE_REACHED",
      "name": "Reached Resolution",
      "config": {
        "node_id": "resolution-node"
      },
      "is_required": true,
      "weight": 1.0,
      "order": 1
    }
  ],
  "created_at": "2026-04-10T12:00:00.000Z",
  "updated_at": "2026-04-14T10:30:00.000Z"
}

Headers

authorization
string
required
Your API key for authentication.

Path Parameters

id
string
required
The scenario ID.

Body Parameters

name
string
Name of the scenario. Must be unique within the pathway/persona.
description
string
Description of what the scenario tests.
category
string
One of: CUSTOM, VOICEMAIL, VOICEMAIL_SCREENER, ANGRY_CALLER, BELLIGERENT_CALLER, CONFUSED_CALLER, CALL_SCREENER, HAPPY_PATH, EDGE_CASE.
scenario_type
string
One of: AGENT, REPLAY, HISTORICAL.
tester_persona_prompt
string
Prompt instructing the simulated caller how to behave.
tester_persona_name
string
Display name for the tester persona.
max_turns
integer
Max conversation turns before the test ends. Maximum value is 50.
request_data
object
Custom request data to pass to the pathway (e.g., variables).
start_node_id
string
ID of the node to start the test from.
bland_tone_enabled
boolean
Enable Bland Tone naturalness scoring.
is_required_for_promotion
boolean
If true, this scenario must pass before the pathway can be promoted to production.
enabled
boolean
Whether the scenario is enabled.
input_messages
array
Pre-seeded messages for REPLAY scenarios.
advanced_instructions
string
Additional instructions for test execution.
metadata
object
Arbitrary metadata to attach to the scenario.
assertions
array
Array of assertion definitions. If provided, replaces all existing assertions.

Response

id
string
Unique identifier for the scenario.
org_id
string
Organization ID that owns this scenario.
pathway_id
string
The pathway ID being tested (null if testing a persona).
persona_id
string
The persona ID being tested (null if testing a pathway).
name
string
Name of the scenario.
description
string
Description of the scenario.
category
string
Scenario category.
scenario_type
string
Type of scenario.
tester_persona_prompt
string
Prompt for the simulated caller.
tester_persona_name
string
Display name for the tester persona.
max_turns
integer
Maximum conversation turns.
request_data
object
Custom request data.
start_node_id
string
Starting node ID.
bland_tone_enabled
boolean
Whether Bland Tone scoring is enabled.
is_required_for_promotion
boolean
Whether this scenario is required for promotion.
enabled
boolean
Whether the scenario is enabled.
input_messages
array
Pre-seeded messages for replay scenarios.
advanced_instructions
string
Additional instructions for test execution.
metadata
object
Arbitrary metadata.
assertions
array
Array of assertion objects.
created_at
string
ISO 8601 timestamp of when the scenario was created.
updated_at
string
ISO 8601 timestamp of when the scenario was last updated.
{
  "id": "a1b2c3d4-5678-9abc-def0-1234567890ab",
  "org_id": "b2c3d4e5-6789-abcd-ef01-234567890abc",
  "pathway_id": "c3d4e5f6-789a-bcde-f012-34567890abcd",
  "persona_id": null,
  "name": "Angry Caller Test - Updated",
  "description": "Tests the agent's ability to de-escalate an angry caller with updated assertions",
  "category": "ANGRY_CALLER",
  "scenario_type": "AGENT",
  "tester_persona_prompt": "You are a frustrated customer who has been waiting on hold for 30 minutes. You are upset about a billing error on your account.",
  "tester_persona_name": "Frustrated Customer",
  "max_turns": 20,
  "request_data": null,
  "start_node_id": null,
  "bland_tone_enabled": true,
  "is_required_for_promotion": true,
  "enabled": true,
  "input_messages": null,
  "advanced_instructions": null,
  "metadata": null,
  "assertions": [
    {
      "id": "d4e5f6a7-89ab-cdef-0123-4567890abcde",
      "type": "LLM_JUDGE",
      "name": "De-escalation",
      "config": {
        "prompt": "Did the agent successfully de-escalate the situation and address the customer's concerns?",
        "output_type": "score",
        "threshold": 0.8
      },
      "is_required": true,
      "weight": 1.5,
      "order": 0
    },
    {
      "id": "e5f6a7b8-9abc-def0-1234-567890abcdef",
      "type": "NODE_REACHED",
      "name": "Reached Resolution",
      "config": {
        "node_id": "resolution-node"
      },
      "is_required": true,
      "weight": 1.0,
      "order": 1
    }
  ],
  "created_at": "2026-04-10T12:00:00.000Z",
  "updated_at": "2026-04-14T10:30:00.000Z"
}