---
title: "Cancel Deletion"
method: POST
path: "/api/settings/cancel-deletion"
---

# Cancel Deletion

`POST /api/settings/cancel-deletion`

## Request

- Base URL: `https://www.oxfordledge.com` (the document declares no server; this is the origin it was published from)
- URL: `https://www.oxfordledge.com/api/settings/cancel-deletion`
- Auth: none declared

Rescind a pending account deletion inside the 30-day window
(R-RESCIND, OWNER 2026-09-25).

Order, and why:
  1. `pg_clear_user_deletion_requested` -- the window is the UPDATE's own
     predicate; 0 rows means nothing was pending or the window closed
     (409: the row now belongs to the purge cron). A write failure
     propagates (500), never reads as "0 rows".
  2. `rescind_subscriptions_for_erasure` -- lift the period-end cancel the
     deletion set (marker `ol_deletion_requested`) on every subscription
     still at Stripe (best-effort, never raises; a subscription the period
     end already closed is `gone`, a cancel the person or the refund path
     set is `kept`, neither is an error).
     Stripe AFTER the store so a retryable Stripe failure cannot leave
     the account pending while the person believes it is restored.
  3. `_audit_log(user, "deletion_rescinded")` -- the billing audit trail
     gets the rescind next to cancellation.py's cancel_requested /
     cancel_reversed rows. Non-fatal, loud.

## Response `200`

Successful Response

- DeletionRescindResponse: `POST /api/settings/cancel-deletion` -- the restored state after a rescind inside the 30-day window. `pending` is False on success; `subscriptions_restored` says whether every subscription that still existed at Stripe had its period-end cancel lifted (a subscription the period end already closed is reported in `gone`, not as a failure; a period-end cancel the deletion did not set -- the person's own, or the refund path's -- is left in place and reported in `kept`).
  - `status` string, required
  - `pending` boolean, required
  - `subscriptions_restored` boolean, required
  - `restored` object[]
  - `gone` object[]
  - `kept` object[]
  - `message` string, required

---

[API](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api.md) · [All operations](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api/llms.txt) · [OpenAPI document](https://skmtc.dev/oxfordledge/apis/oxford-ledge-api/revisions/e832a1260f0b?raw)
