This is the whole contract. Anything not in this table is not available to apps.
Base URL
PERSONAAS_BASE_URL is https://alpha.personaas.ai.
If your organisation uses Personaas on its own web address, use that address as
PERSONAAS_BASE_URL instead: the address you open Personaas on in the browser,
without any path. Everything else in these docs stays the same.
Base: $PERSONAAS_BASE_URL. Header on every call: x-personaas-key for a personal API
key, or Authorization: Bearer … for a signed-in user (see Authentication).
Copy each path exactly as written, including its version prefix (/api/v1,
/api/v2 or /api/v3). The prefix differs between endpoints. Where a path says
{engine}, fill in your organisation's engine (v1 or v3); see
Engines.
Sign-in
Only for apps where users sign in with their Personaas account. See
Authentication.
| Method | Path | Use |
|---|
| POST | /api/v1/auth/jwt/login | Sign in with username or email and password |
| POST | /api/v1/auth/jwt/refresh | Get a new access token |
| POST | /api/v1/auth/jwt/logout | End the session |
Personas
| Method | Path | Use |
|---|
| GET | /api/v1/personas/ | Personas assigned to the user, each with its tasks |
| GET | /api/v1/personas/{persona_id} | One persona |
Engine
| Method | Path | Use |
|---|
| GET | /api/v1/auth/me | Who the key or token acts as. active_organization.config.persona_executor is the organisation's engine: v3 if it is "v3", otherwise v1 |
Running
{engine} is your organisation's engine, v1 or v3. See Engines.
| Method | Path | Use |
|---|
| POST | /api/{engine}/activity/{activity_id}/message | Send a question or a follow-up. Returns straight away; the answer comes on the stream (open it first) |
| GET | /api/v2/activity/{activity_id}/stream | Server-sent events for a conversation (same on both engines) |
| POST | /api/{engine}/activity/{activity_id}/kill | Stop a run in progress |
Conversations
| Method | Path | Use |
|---|
| POST | /api/v1/activity/ | Create a conversation with a persona and task |
| POST | /api/v1/activity/resolve | Find the best persona and task for a question, and create the conversation |
| GET | /api/v1/activity/my-activities | The user's conversations, paged |
| GET | /api/v1/activity/{activity_id} | One conversation's details and status (in_progress while the persona works) |
| GET | /api/v1/activity/{activity_id}/messages | Messages and files of a conversation |
| PUT | /api/v1/activity/{activity_id}/name | Rename a conversation |
Files
| Method | Path | Use |
|---|
| POST | /api/v1/activity/{activity_id}/upload-file | Upload a file for the persona to read |
| GET | /api/v1/artifacts/{activity_id}/files | Files of a conversation |
| GET | /api/v1/artifacts/{activity_id}/file/{filename}/download | Download one file |
| GET | /api/v1/artifacts/{activity_id}/file/{filename}/signed-url | Short-lived direct link to one file |
Status codes you must handle
| Status | Meaning |
|---|
400 | Bad request; read detail. Mentions an encryption key when the task is sensitive |
401 | Bad or expired token |
403 | Not allowed |
404 | Persona, task or conversation not found |
503 | Engine v3, when sending: no free runner. If detail is "No runner available", send the same message once on v1; see Engines |