Get Persona
Retrieve detailed information about a specific persona.
Includes full prompt text, usage statistics, and recent simulation performance data.
Request
curl -X GET "https://api.chanl.ai/api/v1/workspaces/ws_123/personas/persona_456" \
-H "Authorization: Bearer <access_token>"const response = await fetch(`https://api.chanl.ai/api/v1/workspaces/${workspaceId}/personas/${personaId}`, {
headers: {
'Authorization': 'Bearer ' + accessToken
}
});
const { data } = await response.json();
console.log('Persona details:', data.persona);import requests
response = requests.get(
f'https://api.chanl.ai/api/v1/workspaces/{workspace_id}/personas/{persona_id}',
headers={'Authorization': f'Bearer {access_token}'}
)
persona = response.json()['data']['persona']Response
{
"success": true,
"data": {
"persona": {
"id": "persona_456",
"name": "Frustrated Customer",
"language": "en",
"prompt": "You are a frustrated customer who has been having issues with your service for weeks. You are impatient and want immediate resolution. Speak with an upset but not abusive tone. Express your frustration clearly but remain professional.",
"emotion": "frustrated",
"difficulty": "hard",
"backgroundNoise": "office",
"tags": ["frustrated", "impatient", "support"],
"created_at": "2024-01-01T10:00:00Z",
"updated_at": "2024-01-15T09:30:00Z",
"created_by": {
"id": "user_123",
"name": "John Doe",
"email": "john@acme.com"
},
"usage_stats": {
"total_simulations": 89,
"avg_score": 72.3,
"last_used": "2024-01-15T08:45:00Z",
"success_rate": 94.3,
"avg_duration": "00:03:12"
},
"performance_by_scenario": [
{
"scenario_id": "scenario_123",
"scenario_name": "Billing Inquiry",
"simulations": 23,
"avg_score": 68.5
},
{
"scenario_id": "scenario_456",
"scenario_name": "Technical Support",
"simulations": 34,
"avg_score": 75.2
}
]
}
}
}{
"success": false,
"error": {
"code": "PERSONA_NOT_FOUND",
"message": "Persona not found or access denied"
}
}