const url = ' https://api.opdns.io/v1/auth/me ' ;
cookie: ' opdns_session=<opdns_session> ' ,
' Content-Type ' : ' application/json '
body: ' {"confirm":"example","password":"example","totp_code":"example","recovery_code":"example"} '
const response = await fetch ( url , options );
const data = await response . json ();
--url https://api.opdns.io/v1/auth/me \
--header ' Content-Type: application/json ' \
--cookie opdns_session=<opdns_session> \
--data ' { "confirm": "example", "password": "example", "totp_code": "example", "recovery_code": "example" } '
Starts the deletion of the account. Needs a sign-in within the last
five minutes (reauth_required), confirm equal to the account’s email
address, and a credential: password, or totp_code / recovery_code
(a session signed in with a passkey needs neither). Attempts are limited per
account.
Takes effect at once: every session (this one included; the cookie is
cleared) and API token is revoked, every self-hosted node of the account is
revoked and disconnected, every profile is tombstoned on the resolvers
(queries to it are REFUSED) and the profiles’ node log queues are purged. A
confirmation email states the erasure date and the backup expiry.
During the cooling-off (7 days) the account may sign in only to read its
state, cancel (POST /v1/auth/me/undelete), sign out and download earlier
exports; everything else is 403 account_pending_deletion. When it ends,
the account, its profiles’ configuration and query logs (ClickHouse rows,
rollups and aggregates) are erased; audit entries are kept anonymised.
Backups are not edited and expire on their own schedule. Profile ids are
never reused.
Media type application/json
object The account’s email address, typed by the user.
string
Examplegenerated "recovery_code" : " example "
Media type application/json
object string
Allowed values: pending_deletion
When the account is erased unless the deletion is cancelled.
string format: date-time
profiles_tombstoned required
Example "status" : " pending_deletion "
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated invalid_credentials signup_closed invite_required waitlist_unavailable invalid_token token_expired token_used session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict unknown_list too_many_rules validation_failed rate_limited internal node_revoked node_offline node_busy node_timeout node_error result_too_large shape_unsupported node_token_superseded relay_unavailable not_implemented query_timeout query_too_expensive range_too_large too_many_queries second_factor_required invalid_second_factor mfa_enrolment_required mfa_required reauth_required no_second_factor totp_already_enabled totp_not_enabled last_credential passkey_exists passkey_invalid passkeys_unavailable ceremony_invalid account_pending_deletion credential_required deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists invalid_recovery_code profile_not_empty invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports password_too_short password_too_long profile_suspended
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example "type" : " https://opdns.io/problems/bad_request " ,
"detail" : " invalid JSON body " ,
"request_id" : " 5f2c9a0e7b1d4c38 "
unauthenticated, invalid_credentials (wrong password), invalid_second_factor, or credential_required (no password or code sent).
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated invalid_credentials signup_closed invite_required waitlist_unavailable invalid_token token_expired token_used session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict unknown_list too_many_rules validation_failed rate_limited internal node_revoked node_offline node_busy node_timeout node_error result_too_large shape_unsupported node_token_superseded relay_unavailable not_implemented query_timeout query_too_expensive range_too_large too_many_queries second_factor_required invalid_second_factor mfa_enrolment_required mfa_required reauth_required no_second_factor totp_already_enabled totp_not_enabled last_credential passkey_exists passkey_invalid passkeys_unavailable ceremony_invalid account_pending_deletion credential_required deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists invalid_recovery_code profile_not_empty invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports password_too_short password_too_long profile_suspended
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example "type" : " https://opdns.io/problems/invalid_credentials " ,
"code" : " invalid_credentials " ,
"detail" : " wrong password " ,
"request_id" : " 5f2c9a0e7b1d4c38 "
Authenticated but not allowed: insufficient_scope, session_required, csrf_rejected, mfa_enrolment_required (restricted session), mfa_required (an operator action, or an admin-scoped token, from a session signed in with the password alone; not in dev), reauth_required (sign in again within five minutes), account_pending_deletion (the account is in its deletion cooling-off).
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated invalid_credentials signup_closed invite_required waitlist_unavailable invalid_token token_expired token_used session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict unknown_list too_many_rules validation_failed rate_limited internal node_revoked node_offline node_busy node_timeout node_error result_too_large shape_unsupported node_token_superseded relay_unavailable not_implemented query_timeout query_too_expensive range_too_large too_many_queries second_factor_required invalid_second_factor mfa_enrolment_required mfa_required reauth_required no_second_factor totp_already_enabled totp_not_enabled last_credential passkey_exists passkey_invalid passkeys_unavailable ceremony_invalid account_pending_deletion credential_required deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists invalid_recovery_code profile_not_empty invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports password_too_short password_too_long profile_suspended
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example "type" : " https://opdns.io/problems/insufficient_scope " ,
"code" : " insufficient_scope " ,
"detail" : " the token lacks the profiles:write scope " ,
"request_id" : " 5f2c9a0e7b1d4c38 "
deletion_pending (already scheduled) or organisation_has_members.
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated invalid_credentials signup_closed invite_required waitlist_unavailable invalid_token token_expired token_used session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict unknown_list too_many_rules validation_failed rate_limited internal node_revoked node_offline node_busy node_timeout node_error result_too_large shape_unsupported node_token_superseded relay_unavailable not_implemented query_timeout query_too_expensive range_too_large too_many_queries second_factor_required invalid_second_factor mfa_enrolment_required mfa_required reauth_required no_second_factor totp_already_enabled totp_not_enabled last_credential passkey_exists passkey_invalid passkeys_unavailable ceremony_invalid account_pending_deletion credential_required deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists invalid_recovery_code profile_not_empty invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports password_too_short password_too_long profile_suspended
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example "type" : " https://opdns.io/problems/deletion_pending " ,
"code" : " deletion_pending " ,
"detail" : " account deletion is already scheduled " ,
"request_id" : " 5f2c9a0e7b1d4c38 "
Field validation failed (validation_failed, unknown_list).
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated invalid_credentials signup_closed invite_required waitlist_unavailable invalid_token token_expired token_used session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict unknown_list too_many_rules validation_failed rate_limited internal node_revoked node_offline node_busy node_timeout node_error result_too_large shape_unsupported node_token_superseded relay_unavailable not_implemented query_timeout query_too_expensive range_too_large too_many_queries second_factor_required invalid_second_factor mfa_enrolment_required mfa_required reauth_required no_second_factor totp_already_enabled totp_not_enabled last_credential passkey_exists passkey_invalid passkeys_unavailable ceremony_invalid account_pending_deletion credential_required deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists invalid_recovery_code profile_not_empty invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports password_too_short password_too_long profile_suspended
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example "type" : " https://opdns.io/problems/validation_failed " ,
"title" : " Unprocessable Content " ,
"code" : " validation_failed " ,
"detail" : " the request has invalid fields " ,
"field" : " settings.block_mode " ,
"message" : " one of nxdomain, refused, null, block-page "
"request_id" : " 5f2c9a0e7b1d4c38 "
Rate limited (rate_limited).
Media type application/problem+json
object string
Allowed values: bad_request body_too_large bad_if_match unauthenticated invalid_credentials signup_closed invite_required waitlist_unavailable invalid_token token_expired token_used session_required insufficient_scope csrf_rejected not_found version_mismatch ip_conflict unknown_list too_many_rules validation_failed rate_limited internal node_revoked node_offline node_busy node_timeout node_error result_too_large shape_unsupported node_token_superseded relay_unavailable not_implemented query_timeout query_too_expensive range_too_large too_many_queries second_factor_required invalid_second_factor mfa_enrolment_required mfa_required reauth_required no_second_factor totp_already_enabled totp_not_enabled last_credential passkey_exists passkey_invalid passkeys_unavailable ceremony_invalid account_pending_deletion credential_required deletion_pending no_deletion_pending deletion_started organisation_has_members export_in_progress export_not_ready block_exists invalid_recovery_code profile_not_empty invalid_cursor bad_idempotency_key idempotency_key_reused idempotency_in_progress too_many_streams too_many_reports password_too_short password_too_long profile_suspended
retry_after
Seconds, repeating the Retry-After header (rate limits, offline nodes).
integer
Example "type" : " https://opdns.io/problems/rate_limited " ,
"title" : " Too Many Requests " ,
"detail" : " too many requests " ,
"request_id" : " 5f2c9a0e7b1d4c38 " ,