Upsert Recovery Codes

put/api/v2/user/recoverycodes

Generate a new set of recovery codes. It creates a new set or replaces the existing set of codes. Requires the user_manage scope. Session must be unlocked using the Unlock endpoint, prior to hitting this route.

201 Response

id string required
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
created string <date-time>required
ISO 8601 string representation of date
Example: 2019-05-02T15:27:35.773Z
codes array[object] required
Min items: >= 10 items
Max items: <= 10 items
code string required
The recovery code
Example: uFN4wrsjdpK3
isActive boolean required
Whether the recovery code is active
Example: true

401 Response

name string
Error code
context object required
Properties that apply to a specific error name
error string required
Human-readable error message
requestId string required
Client request id