Create Test Scenario
Agent Testing
Create Test Scenario
Create a new test scenario with assertions for a pathway or persona.
POST
Create Test Scenario
Documentation Index
Fetch the complete documentation index at: https://docs.bland.ai/llms.txt
Use this file to discover all available pages before exploring further.
Headers
Your API key for authentication.
Body Parameters
The pathway to test. Either
pathway_id or persona_id is required.The persona to test. Either
pathway_id or persona_id is required.Name of the scenario. Must be unique within the pathway/persona.
Description of what the scenario tests.
One of:
CUSTOM, VOICEMAIL, VOICEMAIL_SCREENER, ANGRY_CALLER, BELLIGERENT_CALLER, CONFUSED_CALLER, CALL_SCREENER, HAPPY_PATH, EDGE_CASE.One of:
AGENT, REPLAY, HISTORICAL.Prompt instructing the simulated caller how to behave.
Display name for the tester persona.
Max conversation turns before the test ends. Maximum value is 50.
Custom request data to pass to the pathway (e.g., variables).
ID of the pathway node where the simulated conversation should begin. Use this to test a specific branch of a pathway without rewiring the flow. When omitted (or
null), the test runs from the pathway’s default start node. If the ID does not match a node in the current pathway version, the run fails with an Invalid start_node_id error.Enable Bland Tone naturalness scoring.
If true, this scenario must pass before the pathway can be promoted to production.
Pre-seeded messages for
REPLAY scenarios.Additional instructions for test execution.
Arbitrary metadata to attach to the scenario.
Array of assertion definitions.
Response
Unique identifier for the created scenario.
Organization ID that owns this scenario.
The pathway ID being tested (null if testing a persona).
The persona ID being tested (null if testing a pathway).
Name of the scenario.
Description of the scenario.
Scenario category.
Type of scenario.
Prompt for the simulated caller.
Display name for the tester persona.
Maximum conversation turns.
Custom request data.
Starting node ID.
Whether Bland Tone scoring is enabled.
Whether this scenario is required for promotion.
Whether the scenario is enabled.
Pre-seeded messages for replay scenarios.
Additional instructions for test execution.
Arbitrary metadata.
Array of assertion objects.
ISO 8601 timestamp of when the scenario was created.
Docs for agents: llms.txt