Skip to main content
POST

Authorizations

Authorization
string
header
required

JWT login token tied to your Perfai user (not a separate API key). Obtain it via POST /api/v1/auth/token with your username and password (use the returned id_token) — the same login the web console performs. Carries org, user, and role; short-lived.

Path Parameters

appId
string
required

MongoDB ObjectId of the app (from GET /apps or POST /apps).

Body

application/json
operation
enum<string>
default:map

map — explore the app and generate/refresh the API spec; validate-login — verify stored credentials still work; discover-roles — discover RBAC roles; verify-rbac — re-verify role capabilities.

Available options:
map,
validate-login,
discover-roles,
verify-rbac

Response

Vision run accepted.

taskId
string
appId
string
operation
string

Vision operation (internally created runs may surface their raw task type).

state
enum<string>
Available options:
QUEUED,
RUNNING,
COMPLETED,
FAILED,
CANCELLED
createdAt
string<date-time> | null
updatedAt
string<date-time> | null
statusUrl
string