# Delete user by id

`DELETE https://api.airtable.com/v0/meta/enterpriseAccounts/{enterpriseAccountId}/users/{userId}`

Delete ELA enterprise account [internal](https://airtable.com/developers/web/api/org-management-glossary.md#internal-users) users and "claiming" enterprise account [managed](https://airtable.com/developers/web/api/org-management-glossary.md#managed-user) users.

## 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`

- `userId: string`

## Response format

Returns `null`.

## Error responses

### 403

**Action on self failure** — Don't deactivate yourself or you might lose access. If action must be performed, add another admin.

```json
{
  "error": {
    "message": "Cannot perform action on self",
    "type": "INVALID_PERMISSIONS"
  }
}
```

**Cannot delete sole owner** — If a workspace has more than one collaborator, it must have at least one owner. So the sole owner cannot be deleted.

```json
{
  "error": {
    "message": "Cannot delete sole owner of a workspace with other collaborators",
    "type": "INVALID_PERMISSIONS"
  }
}
```

**External user account** — Cannot modify external user state since they are not considered part of the enterprise account.

```json
{
  "error": {
    "message": "User does not belong to the enterprise email domain",
    "type": "INVALID_PERMISSIONS"
  }
}
```

**FLA account error** — The provisioned and deactivated states apply only to ELA and "claiming" enterprise accounts. FLA users are always provisioned.

```json
{
  "error": {
    "message": "State modification is not enabled for FLA enterprise accounts",
    "type": "INVALID_PERMISSIONS"
  }
}
```

**Non-managed user account** — Can only manage information of managed users.

```json
{
  "error": {
    "message": "User is not managed by the enterprise account",
    "type": "INVALID_PERMISSIONS"
  }
}
```
