Skip to content

ARCO requests (support-initiated deletion)

The privacy policy offers an email path for people who cannot use Menu → Manage account → /account/delete: they are locked out, have lost the email account, or were already purged and want confirmation. Mexican law (LFPDPPP) calls these ARCO requests: Acceso, Rectificación, Cancelación, Oposición. This page covers Cancelación (deletion). The self-service flow stays the default; use this only when it cannot work.

Do not act on a request until the sender is shown to own the account:

  • The request comes from the account’s email address, or the sender replies from it to a confirmation you send there.
  • If they no longer control that address, ask for the documents counsel specifies (for example an official ID matching the account name). Do not accept a phone call or a different email on its own.

Write down how identity was verified. It goes in the reason column below.

Against the target database (print the host first, see CLAUDE.md §4):

SELECT id, email, "deletedAt", "purgedAt" FROM users WHERE lower(email) = lower('<address>');
SELECT id, "scheduledFor", "canceledAt", "purgedAt", source, reason
FROM account_deletion_requests WHERE "userId" = '<userId>' ORDER BY "createdAt" DESC;
  • purgedAt set on the user: the account is already erased. Reply that the deletion is complete, and when.
  • An open request (no canceledAt, no purgedAt): the deletion is already scheduled. Reply with the scheduledFor date, or go to step 4 if they ask for immediate erasure.
  • Otherwise go to step 3.

From a Bun REPL in the repo root, with the target environment’s Doppler config (doppler run -c <config> -- bun repl):

import { db } from '@repo/database/kysely';
import { requestAccountDeletion, getStripe, isStripeConfigured } from '@repo/integrations';
const stripe = isStripeConfigured() ? getStripe() : null;
await requestAccountDeletion(db, stripe, {
userId: '<userId>',
source: 'admin',
actorUserId: '<your admin user id>',
reason: 'ARCO cancelación, <date>, identity verified by <method>, ticket <ref>',
});

This is the same request the web flow makes: the account is hidden at once, listings go offline, the “scheduled” email goes out, and the normal 30-day restore window starts. Blocked cases (a sole team LEAD, an ADMIN) throw the same errors as the web flow; resolve those with the user first.

4. Immediate erasure (only with counsel’s OK)

Section titled “4. Immediate erasure (only with counsel’s OK)”

When the person asks for erasure without the 30-day window and counsel agrees the window can be skipped:

import { purgeAccount } from '@repo/integrations';
await purgeAccount(db, stripe, '<requestId>', { force: true });

If it throws AccountPurgeIncompleteError, the database part is done and an external step failed. Re-run the same call (every step is idempotent) or follow the accounts row in Incident guides.

LFPDPPP gives the company 20 business days to respond to an ARCO request and 15 business days after the response to carry it out. The privacy policy currently says “the period the law requires”. Counsel must confirm these figures before they are quoted to a user or written into the policy.

  • account_deletion_requests.reason (nullable text) holds the request reference and how identity was verified. Step 3 sets it; for a request that already existed, update it:

    UPDATE account_deletion_requests SET reason = '<reference>' WHERE id = '<requestId>';
  • Reply to the person with the outcome and the date the data will be (or was) erased.

  • Acceso (a copy of their data) has no tooling yet. It needs its own ticket; link it here once it exists.
  • Rectificación is self-service in profile settings; support edits only what the user cannot.