Skip to main content
Create a new customer behavior profile for testing scenarios. Personas help create realistic and varied interactions for comprehensive agent evaluation.
curl -X POST "https://api.chanl.ai/api/v1/workspaces/ws_123/personas" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "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.",
    "emotion": "frustrated",
    "difficulty": "hard",
    "backgroundNoise": "office",
    "tags": ["frustrated", "impatient", "support"]
  }'
{
  "success": true,
  "data": {
    "persona": {
      "id": "persona_789",
      "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.",
      "emotion": "frustrated",
      "difficulty": "hard",
      "backgroundNoise": "office",
      "tags": ["frustrated", "impatient", "support"],
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z",
      "created_by": {
        "id": "user_123",
        "name": "John Doe"
      }
    }
  }
}

Required Fields

name
string
required
Descriptive name for the persona (must be unique within workspace)
language
string
required
Language code in ISO 639-1 format (e.g., “en”, “es”, “fr”)
prompt
string
required
Detailed behavioral description and instructions for the persona

Optional Fields

emotion
string
Emotional state: frustrated, happy, confused, neutral, angry, excited, etc.
difficulty
string
Interaction difficulty level: easy, medium, hard
backgroundNoise
string
Audio environment: none, office, street, cafe, custom
tags
array
Array of categorization tags for filtering and organization

Persona Examples

{
  "name": "Confused Customer",
  "language": "en",
  "prompt": "You are a customer who doesn't understand technology very well. You need help but have trouble explaining your issue clearly. Ask lots of questions and need things explained simply.",
  "emotion": "confused",
  "difficulty": "medium",
  "backgroundNoise": "none",
  "tags": ["confused", "support", "technical"]
}

Best Practices

Create personas based on real customer interactions and feedback data
  • Use specific, actionable behavioral descriptions
  • Include relevant emotional context that affects conversation tone
  • Test personas across different scenarios before production use
  • Tag personas consistently for easy filtering and organization
  • Keep prompts focused but detailed enough for consistent behavior
  • Avoid contradictory instructions within a single persona