Skip to main content

List personas and tasks

Start every app here. This call returns the personas assigned to the user, each with the tasks it can do. Every run needs a persona id and a task id from this list.

Request​

curl "$PERSONAAS_BASE_URL/api/v1/personas/" \
-H "x-personaas-key: $PERSONAAS_API_KEY"

Keep the trailing slash.

Response​

A JSON array. Only personas assigned to the calling user are returned. The fields an app normally needs:

[
{
"id": 12,
"name": "HR Assistant",
"designation": "HR Business Partner",
"description": "Answers leave and policy questions",
"is_active": true,
"image_url": "https://…",
"tasks": [
{ "id": 40, "name": "Leave questions", "description": "…", "sensitive": false }
]
}
]

The response has more fields than shown. Use only these.

image_url is a temporary link. Fetch the list again rather than storing it.

Optional query parameters​

NameEffect
searchFilter by text
is_activetrue or false
limit, pagePaging. With limit the response shape changes to {"items": [...], "pagination": {...}}

Mistakes to avoid​

  • Looking for a separate tasks endpoint. Tasks come inside each persona.
  • Hard-coding 12 and 40. Find the persona by name, or let the user choose.
  • Showing a task with "sensitive": true. These tasks keep their conversations encrypted and apps cannot run them yet. Hide them.
  • Treating an empty array as an error. It means no persona is assigned yet.