Skip to main content

API reference

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.

MethodPathUse
POST/api/v1/auth/jwt/loginSign in with username or email and password
POST/api/v1/auth/jwt/refreshGet a new access token
POST/api/v1/auth/jwt/logoutEnd the session

Personas​

MethodPathUse
GET/api/v1/personas/Personas assigned to the user, each with its tasks
GET/api/v1/personas/{persona_id}One persona

Engine​

MethodPathUse
GET/api/v1/auth/meWho 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.

MethodPathUse
POST/api/{engine}/activity/{activity_id}/messageSend a question or a follow-up. Returns straight away; the answer comes on the stream (open it first)
GET/api/v2/activity/{activity_id}/streamServer-sent events for a conversation (same on both engines)
POST/api/{engine}/activity/{activity_id}/killStop a run in progress

Conversations​

MethodPathUse
POST/api/v1/activity/Create a conversation with a persona and task
POST/api/v1/activity/resolveFind the best persona and task for a question, and create the conversation
GET/api/v1/activity/my-activitiesThe 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}/messagesMessages and files of a conversation
PUT/api/v1/activity/{activity_id}/nameRename a conversation

Files​

MethodPathUse
POST/api/v1/activity/{activity_id}/upload-fileUpload a file for the persona to read
GET/api/v1/artifacts/{activity_id}/filesFiles of a conversation
GET/api/v1/artifacts/{activity_id}/file/{filename}/downloadDownload one file
GET/api/v1/artifacts/{activity_id}/file/{filename}/signed-urlShort-lived direct link to one file

Status codes you must handle​

StatusMeaning
400Bad request; read detail. Mentions an encryption key when the task is sensitive
401Bad or expired token
403Not allowed
404Persona, task or conversation not found
503Engine v3, when sending: no free runner. If detail is "No runner available", send the same message once on v1; see Engines