---
title: "Revoke a session policy"
method: DELETE
path: "/wallets/{address}/policies/{policyId}"
tags: ["Policies"]
---

# Revoke a session policy

`DELETE /wallets/{address}/policies/{policyId}`

Outcomes:

- `status: deleted` — rare: no InstallCall retained; record removed.
- `status: revoked`, `onChainCleanupRequired: false` — pending grant
  retained so InstallCall survives a late-landing install (orphan
  path). Not known on chain yet; no cleanup payload.
- `status: revoked`, `onChainCleanupRequired: true` — applied grant
  still believed installed. Response includes `onChainCleanup`
  (uninstallValidation call for the owner wallet: plain tx to the
  runner, or owner-fallback UserOp). Once teardown is verified,
  GET no longer returns cleanup for that policy.

## Response `200`

Revocation outcome.

- RevokePolicyResponse
  - `status` 'deleted' | 'revoked', required — deleted = was pending, nothing was ever installed. revoked = retained for audit.
  - `onChainCleanupRequired` boolean, required — True when the grant's validation is still installed on the account and needs the owner's uninstallValidation to clear.
  - `onChainCleanup` OnChainRevokeCleanup — Owner-executable call that clears an applied grant's validation entity and hooks from the runner. Production grants are policied: the gateway controller cannot self-uninstall (allowlist blocks uninstallValidation). The owner sends this as a plain transaction to `target` (or a UserOp validated by the owner fallback). Derived from the retained `Grant.InstallCall`, never from live permission structs.
    - `entityId` integer, required — Validation entity this cleanup removes.
    - `target` string, required — Lowercase or checksummed hex EOA / contract address.
    - `callData` string, required — Arbitrary-length hex-encoded byte string.
    - `chainId` integer, required — Chain the runner lives on.

## Other responses

- `401` — Missing or invalid bearer token.
- `403` — Authenticated but not permitted.
- `404` — Resource not found.

---

[API](https://skmtc.net/avaprotocol/apis/ava-protocol-avs-api.md) · [All operations](https://skmtc.net/avaprotocol/apis/ava-protocol-avs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/avaprotocol/ava-protocol-avs-api/versions/231d563f2c9f/schema)
