Human account authentication
Use discovery, OTP or password and MFA for human-only API operations.
Use human account authentication when calling supported account operations or managing application registrations. These operations require a human access token and active session; an API key or IntegrationBearer token cannot replace that session. For application access to business data, use the API key or OAuth guides instead.
Discover and sign in
API base: https://api.prastav.io. JSON requests require Content-Type: application/json. Examples use reserved artificial identifiers.
Discover sign-in methods with
{"identifier":"developer@example.com"}. Choose only a returnedavailableAuthMethodsvalue. An unknown account returns accountExists=false and no methods. Password presence alone does not authorize that method.If offered, begin OTP with
{"identifier":"developer@example.com","channel":"EmailOtp"}. SmsOtp is available only when offered. Save challengeId and use the actual received code. Submission is not proof of delivery; retain an uncertain submission and do not blindly repeat a send.Verify OTP with
{"challengeId":"RETURNED_GUID","otpCode":"RECEIVED_CODE"}. Codes are strings; preserve leading zeroes. Success returns AuthResponse directly with top-level accessToken.For offered password sign-in, send identifier and password. If requiresOtp=false, use auth.accessToken. If requiresOtp=true, use challenge.challengeId in the same OTP verification operation; successful MFA returns the top-level accessToken.
Challenges expire and are single-use. Beginning another challenge replaces the previous active login challenge; it is not a cooldown bypass. Follow effective returned attempt/resend restrictions. Production responses do not provide debug OTP codes.
Scalar and Postman
Choose Bearer, paste only the human accessToken, then call GET /api/auth/me. Scalar adds the Bearer prefix. Sign-in does not automatically authorize Scalar, and credential persistence stays disabled.
In Postman use No Auth for discover, OTP begin/verify and password. Keep the returned accessToken in a private/local variable and choose Bearer Token for /me or permitted registration management. Never place credentials in a shared collection. The returned refreshToken is sensitive and is never a Bearer token. CurrentUserResponse uses timeZone while AuthResponse uses timeZoneId; workspace context can legitimately be absent.
Missing, expired, invalid or revoked sessions return 401. Sign-in errors use action-specific safe codes and correlation identifiers; inspect the current operation response schema. See troubleshooting. Completing sign-in for delegated OAuth does not itself grant consent.