Skip to main content
Get all personas in a workspace with filtering and search capabilities. Personas represent different customer behaviors and characteristics used in testing scenarios.
curl -X GET "https://api.chanl.ai/api/v1/workspaces/ws_123/personas" \
  -H "Authorization: Bearer <access_token>"
{
  "success": true,
  "data": {
    "personas": [
      {
        "id": "persona_123",
        "name": "Frustrated Customer",
        "language": "en",
        "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_456",
          "name": "Jane Smith"
        },
        "usage_stats": {
          "total_simulations": 45,
          "avg_score": 72.3,
          "last_used": "2024-01-15T08:45:00Z"
        }
      },
      {
        "id": "persona_456",
        "name": "Polite Customer",
        "language": "en",
        "emotion": "neutral",
        "difficulty": "easy",
        "backgroundNoise": "none",
        "tags": ["polite", "patient", "support"],
        "created_at": "2024-01-05T14:20:00Z",
        "updated_at": "2024-01-10T11:15:00Z",
        "created_by": {
          "id": "user_456",
          "name": "Jane Smith"
        },
        "usage_stats": {
          "total_simulations": 67,
          "avg_score": 91.8,
          "last_used": "2024-01-14T16:20:00Z"
        }
      }
    ],
    "pagination": {
      "total": 15,
      "page": 1,
      "limit": 50,
      "has_more": false
    }
  }
}

Query Parameters

name
string
Search personas by name (partial match)
language
string
Filter by language code (e.g., “en”, “es”, “fr”)
emotion
string
Filter by emotional state (frustrated, happy, confused, neutral, etc.)
difficulty
string
Filter by difficulty level (easy, medium, hard)
tags
string
Filter by tags (comma-separated)
createdBy
string
Filter by creator user ID
sortBy
string
Sort field (name, createdAt, updatedAt, usage)
sortOrder
string
Sort direction (asc, desc)
limit
number
Maximum number of results (default: 50, max: 100)
offset
number
Number of results to skip for pagination

Filtering Examples

curl -X GET "https://api.chanl.ai/api/v1/workspaces/ws_123/personas?emotion=frustrated" \
  -H "Authorization: Bearer <access_token>"