Get task status
Returns the current state of any task on this API — a registration, a security test, or a Vision Agent run. Every action that starts work returns a taskId; poll this URL until state is COMPLETED, FAILED, CANCELLED or INTERRUPTED.
Authorizations
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
Task identifier returned by register, run-security-agent or run-vision-agent (for example task_wf_683def5678901abcd1234abc). Opaque — pass it back verbatim, do not parse it.
Response
Current task state.
Opaque task identifier. Pass it back verbatim; do not parse it.
"task_wf_683def5678901abcd1234abc"
What kind of work this task represents.
security-agent, vision-agent, registration "security-agent"
"683abc1234567890abcdef12"
Shared lifecycle vocabulary for every task. AWAITING_INPUT means the work has stopped and is waiting for something only you can supply — in practice, test-account credentials for an app the platform could not sign itself up to. Answer it with POST /v1/apps/{appId}/account-setup, after which the task returns to RUNNING. Treat it as non-terminal but do not wait on it: nothing will change until you act. INTERRUPTED means the work was destroyed before reporting an outcome — deliberately not folded into COMPLETED or FAILED, because "completed with zero findings" and "we do not know what it would have found" are different answers.
QUEUED, RUNNING, AWAITING_INPUT, COMPLETED, FAILED, CANCELLED, INTERRUPTED Null if the task has not changed since it was created.
Type-specific detail; the shape follows type.
- Option 1
- Option 2
- Option 3

