admin

Record a confirmed kill on an abandoned upstream revoke

Takes an account off the COGS orphan report when its upstream revoke was never attempted and nothing owns a retry. That is the crash-window row a disconnect leaves if the process dies between the local commit and the provider call, which the leak report shows as retry_ownership 'unowned'. Operator-only and deliberately manual: the route performs NO provider call, it writes down the answer you give it, so answering true without having killed the credential removes a live charge from the one report that would have shown it. Matches only a soft-deleted, revoked, attempt_pending row that is owed no live outbox debt and is older than the abandonment floor. That floor bounds an ordinary in-flight disconnect; it does NOT bound a tenant offboard, whose serial provider loop grows with the account count, so wait for a known offboard to finish before acting on its accounts. It never writes status_code or deleted_at, so it cannot reactivate an account or lift a reconnect fence, and a late disconnect still completes over it. Internal admin users only.

post/v1/admin/integrations/accounts/{account_id}/abandoned-revoke-clearances

Request

  • Base URL: https://api.patricia.app (the document declares no server; this is the origin it was published from)
  • URL: https://api.patricia.app/v1/admin/integrations/accounts/{account_id}/abandoned-revoke-clearances
  • Auth: HTTP bearer

Path parameters

account_idstring uuid required

Connected account abandoned at attempt_pending.

Request body

upstream_confirmed_revokedboolean required

True when the operator verified in the provider's own console that the credential is gone. False records nothing and clears nothing, because an unconfirmed abandoned row already reports itself: kill the credential first, then call this.

Response

Successful Response

accountstring required
tenant_idstring required
clearedboolean required

False when the clearance did not take; see refusal for why.

refusal'upstream_not_confirmed' | 'not_abandoned' | 'live_debt_exists' | 'too_recent'

Why an abandoned-revoke clearance did not take. DERIVED at the point of refusal, never stored.

  • UPSTREAM_NOT_CONFIRMED: the request itself declined to confirm the kill. This route only records a confirmation, so there was nothing to write. Kill the credential in the provider's own console first, then call again.
  • NOT_ABANDONED: the row is not an abandoned revoke. It is live, or it already carries an outcome, or an earlier clearance already recorded one. Nothing to do.
  • LIVE_DEBT_EXISTS: a non-terminal outbox debt is still owed on the credential, so a worker may yet kill it. The leak report shows this account as owned. Wait for that debt to settle.
  • TOO_RECENT: the row is abandoned in shape but too young to be treated as abandoned in fact. A disconnect commits this exact marker BEFORE it calls the provider, so a call that is still running looks identical. Wait, then re-run the leak report.
still_reported_as_orphanedboolean required

True when the account remains on the COGS orphan report, either because the row was not this route's to clear or because it never reached the write.

Changes

No recorded changes to this operation across all 1 revision of this API.