Platform API reference

Platform API · Authentication

post/v1/auth/step-upAuth

Confirm it is you (step-up)

Send exactly one of `{factor_id, code}`, `{recovery_code}`, `{factor_id, webauthn}` or, for an account without factors, `{password}`. Sensitive actions on this session are then allowed for 10 minutes. 5 failures per 15 minutes per session. Not idempotent.

Request body

factor_idstring · uuid

The factor answered (TOTP, email or passkey).

codestring

6-digit TOTP or email code.

recovery_codestring

A recovery code. Works once.

webauthnobject

The `PublicKeyCredential` from `navigator.credentials.get()`, ArrayBuffers base64url-encoded: `{ id, raw_id, type: "public-key", response: { clientDataJSON, authenticatorData, signature, userHandle } }`. WebAuthn member names are passed through verbatim (camelCase by spec).

passwordstring

Only for an account WITHOUT factors: its password.

Response · 200

valid_until*string · date-time

Sensitive actions are allowed until then.

Example

Request

POST https://api.platform-auth.productcraft.co/v1/auth/step-up
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "factor_id": "00000000-0000-0000-0000-000000000000",
  "code": "string",
  "recovery_code": "string",
  "webauthn": {},
  "password": "string"
}

Response

{
  "valid_until": "2026-01-01T00:00:00.000Z"
}