Skip to main content
POST
Create Agent Response Test

Headers

x-api-key
string | null

Your API key for programmatic access. Send it in the x-api-key header; you can create and manage keys from the Developers page.

Body

application/json

Create Chat Response Test Request Information

name
string
required
from_conversation_metadata
TestFromConversationMetadata · object | null

Metadata of a conversation this test was created from (if applicable).

dynamic_variables
Dynamic Variables · object

Dynamic variables to replace in the agent config during testing

chat_history
ConversationHistoryTranscriptCommonModel · object[]
Maximum array length: 200
conversation_initiation_source
enum<string> | null
default:unknown

Simulate the test as if the conversation originated from this channel.

Available options:
unknown,
android_sdk,
node_js_sdk,
react_native_sdk,
react_sdk,
js_sdk,
python_sdk,
widget,
sip_trunk,
twilio,
exotel,
genesys,
avaya,
audiocodes,
swift_sdk,
whatsapp,
twilio_sms,
flutter_sdk,
zendesk_integration,
slack_integration,
telegram_integration,
intercom_integration,
freshdesk_integration,
salesforce_integration,
template_preview,
genesys_bot_connector,
subagent_tool
environment
string | null

The environment to resolve environment-specific variable values against when running this test (URL, headers, auth connections). If not provided, defaults to 'production'. For simulation tests, simulation_environment takes precedence when set.

type
string
default:llm
Allowed value: "llm"
success_conditions
string[]

List of prompts that evaluate whether the agent's response is successful. If provided, all criteria are evaluated and merged into a final result. Capped at the maximum number of evaluation criteria.

Maximum array length: 30
success_examples
AgentSuccessfulResponseExample · object[]

Non-empty list of example responses that should be considered successful

Maximum array length: 5
failure_examples
AgentFailureResponseExample · object[]

Non-empty list of example responses that should be considered failures

Maximum array length: 5
parent_folder_id
string | null

The ID of the parent folder. If not provided, the test will be created at the root level.

Response

Successful Response

id
string
required