> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.paywithatoa.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke Account Access

> Revoke account access via the Atoa Bank Feed API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.

Revoke bank account access for a specific account, multiple accounts, or using an account authorization ID.

## Authorization

Bearer `<token>`

**Request Body Schema**

<ParamField query="accountId" type="string">
  ID of the user's bank account. This can be obtained from the redirect URL
  after account linking or by using the [Fetch All Accounts API
  Reference](/api-reference/AccountInitiationServices/fetch-all-accounts)
  endpoint.

  Refer:- [Accounts](/accounts)
</ParamField>

<ParamField query="accountAuthId" type="string">
  Account authorization ID to revoke access for.
</ParamField>

<ParamField query="accountIds" type="string">
  Comma-separated list of account IDs to revoke access for (e.g.,
  "id1,id2,id3"). This can be obtained from the redirect URL
  after account linking or by using the [Fetch All Accounts API
  Reference](/api-reference/AccountInitiationServices/fetch-all-accounts)
  endpoint.

  Refer:- [Accounts](/accounts)
</ParamField>

**Note**: Only one parameter can be provided: accountId, accountIds, or accountAuthId. Multiple parameters are not allowed.

## Consent Lifecycle & Expiry

* All consents are valid for 90 days.
* If auto-renew is enabled, we will attempt background renewal before expiry.
* Once expired, any call to transactions or account endpoints will return: 404 Consent not found

🧠 **Recommendation**: Prompt users to re-authenticate as consent expiration nears (e.g., 7 days before expiry).

<ResponseExample>
  ```json 200 Single Account theme={null}
  {
    "success": true,
    "message": "Consent successfully revoked for the specified account",
    "revokedDetails": {
      "accountId": "account-id-example"
    }
  }
  ```

  ```json 200 Multiple Accounts theme={null}
  {
    "success": true,
    "message": "Consent successfully revoked for all specified accounts",
    "revokedDetails": {
      "accountIds": [
        {
          "id": "account-id-1",
          "status": "success"
        },
        {
          "id": "account-id-2",
          "status": "success"
        }
      ]
    }
  }
  ```

  ```json 200 Partial Success theme={null}
  {
    "success": false,
    "message": "Consent revocation completed with 1 successes and 1 failures",
    "revokedDetails": {
      "accountIds": [
        {
          "id": "account-id-1",
          "status": "success"
        },
        {
          "id": "account-id-2",
          "status": "failed",
          "error": "Consent not found"
        }
      ]
    }
  }
  ```

  ```json 200 Account Auth ID theme={null}
  {
    "success": true,
    "message": "Consent successfully revoked for the specified reference",
    "revokedDetails": {
      "accountAuthId": "auth-id-example"
    }
  }
  ```

  ```json 400 Multiple Parameters theme={null}
  {
    "name": "BAD_REQUEST",
    "message": "Only one parameter can be provided: accountId, accountIds, or accountAuthId. Multiple parameters are not allowed.",
    "status": 400,
    "errors": "[]"
  }
  ```

  ```json 401 theme={null}
  {
    "name": "UNAUTHORIZED",
    "message": "Unauthorized",
    "status": 401,
    "errors": "[]"
  }
  ```

  ```json 404 theme={null}
  {
    "name": "NOT FOUND",
    "message": "Consent not found",
    "status": 404,
    "errors": "[]"
  }
  ```
</ResponseExample>
