const url = ' https://api.opdns.io/v1/admin/accounts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deletion ' ;
cookie: ' opdns_session=<opdns_session> ' ,
' Content-Type ' : ' application/json '
body: ' {"reason":"example","ticket":"example"} '
const response = await fetch ( url , options );
const data = await response . json ();
--url https://api.opdns.io/v1/admin/accounts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/deletion \
--header ' Content-Type: application/json ' \
--cookie opdns_session=<opdns_session> \
--data ' { "reason": "example", "ticket": "example" } '
Scope admin. For a verified deletion request from someone who cannot sign
in (runbook deletion-request-by-email). Starts exactly the
deletion DELETE /v1/auth/me starts: every session, API token and node is
revoked at once, the profiles are tombstoned and their node log queues
purged, and the account is erased after the same cooling-off (7 days)
unless the deletion is cancelled. The account’s address receives the
account_deletion_scheduled email (with the ticket as its reference and
the cancel link); email_queued is false when it could not be queued (the
deletion stands).
Audited twice in one transaction: account.deletion_requested in the
account’s organisation (actor: the operator), and admin.deletion_requested
in the operator’s organisation with target account_deletion:<deletion_id>
and meta.ticket, meta.reason, meta.account_hash, meta.due_at; erasure
anonymises the first, never the second.
409 export_in_progress while an export of the account is pending or
running (finish the access request first), deletion_pending when a
deletion is already scheduled, organisation_has_members.
Media type application/json
object reason
Why the operator acts (printable text); required to start a deletion, optional to cancel one. Operator-visible only.
string
<= 500 characters
The data-rights request log entry or support ticket (printable text). Quoted to the owner as the email’s reference.
string
>= 1 characters <= 100 characters
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
The account_deletions row; record it in the request log (the account id is cleared when erasure completes).
integer
False when the account_deletion_scheduled email could not be queued.
boolean
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 "
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/unauthenticated " ,
"code" : " unauthenticated " ,
"detail" : " authentication required " ,
"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 "
Not found (also for resources of another organisation).
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/not_found " ,
"detail" : " resource not found " ,
"request_id" : " 5f2c9a0e7b1d4c38 "
export_in_progress, deletion_pending 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/export_in_progress " ,
"code" : " export_in_progress " ,
"detail" : " an export is already being prepared " ,
"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 "