# Revoke admin access

`POST https://api.airtable.com/v0/meta/enterpriseAccounts/{enterpriseAccountId}/users/revokeAdminAccess`

Revokes admin access from users. To use this endpoint, provide either the user's `id` or `email` in the request body. If both are supplied, the `email` will be ignored.

In the example request provided, the first two users are successfully processed while all of the remaining users are not processed and are returned in the `errors` array with the reason why they were not able to be processed.

Note that you can only revoke directly assigned admin access.

## Requirements

- **Authentication:** [Personal access token](https://airtable.com/developers/web/api/authentication.md#types-of-token), [OAuth integration](https://airtable.com/developers/web/api/authentication.md#types-of-token)
- **Scope:** [`enterprise.user:write`](https://airtable.com/developers/web/api/scopes.md#enterprise-user-write)
- **User role:** Enterprise admin
- **Billing plans:** Enterprise (pre-2023.08 legacy plan), Enterprise Scale

## Path parameters

- `enterpriseAccountId: string`

## Request body

- `users: array<object>` — required

  - `id: string` — optional

    A user ID

  - `email: string` — optional

## Response format

- `errors: array<object>` — required

  - `id: string` — optional

    A user ID

  - `type: string` — required

  - `email: string` — optional

  - `message: string` — optional

### Example — Success response

```sh
curl -X POST "https://api.airtable.com/v0/meta/enterpriseAccounts/{enterpriseAccountId}/users/revokeAdminAccess" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
--data '{
    "users": [
      {
        "id": "usrL2PNC5o3H4lBEi"
      },
      {
        "email": "foo@bar.com"
      },
      {
        "email": "bam@bam.com"
      },
      {
        "id": "usrsOEchC9xuwRgKk"
      },
      {
        "email": "foo@bam.com"
      }
    ]
  }'
```

```json
{
  "errors": [
    {
      "email": "bam@bam.com",
      "message": "User not found",
      "type": "NOT_FOUND"
    },
    {
      "id": "usrsOEchC9xuwRgKk",
      "message": "User not found",
      "type": "USER_ID_NOT_FOUND"
    },
    {
      "email": "foo@bam.com",
      "message": "User is not an assigned admin",
      "type": "USER_NOT_ASSIGNED_ADMIN"
    }
  ]
}
```
