Skip to content

Setup account recovery

POST
/api/v1/recovery/setup
curl --request POST \
--url http://localhost:3001/api/v1/recovery/setup \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "min_guardians_required": 1, "recovery_email_hash": "example", "time_lock_hours": 1 }'

Enable social recovery and backup codes for account protection

Recovery setup configuration

Media typeapplication/json
object
min_guardians_required
integer
recovery_email_hash
string
time_lock_hours
integer
Examplegenerated
{
"min_guardians_required": 1,
"recovery_email_hash": "example",
"time_lock_hours": 1
}

OK

Media typeapplication/json
object
backup_codes

12 one-time codes (only shown once!)

Array<string>
message
string
success
boolean
Examplegenerated
{
"backup_codes": [
"example"
],
"message": "example",
"success": true
}

Bad Request

Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{
"error": "example",
"success": true
}

Unauthorized

Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{
"error": "example",
"success": true
}

Internal Server Error

Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{
"error": "example",
"success": true
}