Skip to main content
POST
Run Account Setup

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
tenantOneCredentials
object[]
required

Credentials for the primary tenant, one entry per role. At least one is required — without a usable account the app cannot be tested authenticated.

Required array length: 1 - 20 elements
tenantTwoCredentials
object[]

Credentials for a second tenant. Supply these to enable cross-tenant (BOLA) testing; without a second tenant those checks cannot run.

Maximum array length: 20

Response

Credentials stored; onboarding resumed if it was waiting on them.

appId
string
required
taskId
string
required

Registration task handle — poll GET /v1/tasks/{taskId}.

Example:

"task_reg_683abc1234567890abcdef12"

accountsSaved
integer
required

How many tenant credential sets were stored.

Example:

2

onboardingResumed
boolean
required

True when onboarding was paused waiting for these credentials and has now resumed. False means they are stored but nothing was waiting on them.

Example:

true

statusUrl
string
required