Email an account recovery link (lost sign-in methods).
const url = 'https://api.opdns.io/v1/auth/recover/begin';const options = { method: 'POST', headers: {'Content-Type': 'application/json'},};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.opdns.io/v1/auth/recover/begin \ --header 'Content-Type: application/json' \For an owner who lost their authenticator app or passkeys. Always 202
with the same body, whether or not the address has an account, limited per
address (one a minute, burst 3) as well as per client IP. When the account has
an unused recovery code, a single-use link
(<dashboard>/recover?token=rcv_..., valid one hour) is emailed; an account
without one gets no link, since recovery never works by email alone. Audited
(auth.recovery_requested, auth.recovery_unavailable).
Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{}Responses
Section titled “Responses”Accepted.
object
Example
{ "status": "recovery_sent"}Malformed request.
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
Example
{ "type": "https://opdns.io/problems/bad_request", "title": "Bad Request", "status": 400, "code": "bad_request", "detail": "invalid JSON body", "request_id": "5f2c9a0e7b1d4c38"}Field validation failed (validation_failed, unknown_list).
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
Example
{ "type": "https://opdns.io/problems/validation_failed", "title": "Unprocessable Content", "status": 422, "code": "validation_failed", "detail": "the request has invalid fields", "errors": [ { "field": "settings.block_mode", "message": "one of nxdomain, refused, null, block-page" } ], "request_id": "5f2c9a0e7b1d4c38"}Rate limited (rate_limited).
object
Stable machine code.
object
Seconds, repeating the Retry-After header (rate limits, offline nodes).
Example
{ "type": "https://opdns.io/problems/rate_limited", "title": "Too Many Requests", "status": 429, "code": "rate_limited", "detail": "too many requests", "request_id": "5f2c9a0e7b1d4c38", "retry_after": 6}