# Logout user

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

Logout the user.

Only available for ELA and FLA [internal](https://airtable.com/developers/web/api/org-management-glossary.md#internal-user) enterprise account users and [managed](https://airtable.com/developers/web/api/org-management-glossary.md#managed-user) "claiming" enterprise 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

## Error responses

### 403

**Action on self** — Cannot log yourself out.

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

**Not in domain** — Cannot logout external users.

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

**Not managed by enterprise** — Can only logout managed users.

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