Get Scenario
Retrieve a single scenario by ID with its full configuration and usage statistics.
Get Scenario
Returns the complete scenario object including prompt, linked personas, target agents, scorecard, and aggregate simulation statistics.
Endpoint
GET /api/v1/scenarios/:id
curl -X GET "https://api.chanl.ai/api/v1/scenarios/scenario_abc123" \
-H "Authorization: Bearer <access_token>"const response = await fetch('https://api.chanl.ai/api/v1/scenarios/scenario_abc123', {
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`,
},
});
const data = await response.json();import requests
response = requests.get(
'https://api.chanl.ai/api/v1/scenarios/scenario_abc123',
headers={'Authorization': f'Bearer {access_token}'},
)
data = response.json()Path Parameters
idstringrequiredThe scenario ID (e.g., scenario_abc123).
Response
Response
{
"success": true,
"data": {
"scenario": {
"id": "scenario_abc123",
"name": "Billing Dispute Resolution",
"prompt": "You are calling about an unexpected charge on your account. You want it explained and resolved.",
"promptVariables": [
{
"name": "charge_amount",
"type": "string",
"defaultValue": "$29.99"
}
],
"personas": [
{ "id": "persona_123", "name": "Frustrated Customer" },
{ "id": "persona_456", "name": "Polite Customer" }
],
"targetAgents": [
{ "id": "agent_789", "name": "Support Agent v2" },
{ "id": "agent_012", "name": "Support Agent v3" }
],
"scorecard": {
"id": "scorecard_345",
"name": "Customer Service Quality"
},
"tags": ["billing", "customer-service"],
"status": "active",
"created_at": "2025-01-10T10:00:00Z",
"updated_at": "2025-02-15T09:30:00Z",
"created_by": {
"id": "user_567",
"name": "Jane Smith"
},
"stats": {
"total_simulations": 156,
"avg_score": 84.2,
"success_rate": 94.3,
"last_run": "2025-02-15T08:45:00Z"
}
}
}
}Errors
| Status | Code | Description |
|---|---|---|
| 401 | unauthorized | Missing or invalid access token |
| 404 | not_found | Scenario not found |