> ## Documentation Index
> Fetch the complete documentation index at: https://docs.connectly.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove a User

> Take away a user's access to your business 🚪

## Endpoint

```json theme={null}
DELETE https://api.connectly.ai/external/v1/businesses/{businessId}/users/{userId}
```

| Parameter | Location | Description |
| - | - | - |
| `businessId` | Path | Your Connectly business ID. |
| `userId` | Path | The user's `id`. |
| `X-API-Key` | Header | A [User Management key](https://docs.connectly.ai/user-management-api/overview.md#get-an-api-key). |

***

## Response

The API returns HTTP `200` with an empty object.

```json theme={null}
{}
```

***

## What removal does

* The user loses access to your business. Their next request to Connectly for it is refused.
* An inbox page they already have open can keep receiving new messages until their sign-in session expires.
* Their account is not deleted. Messages they sent, notes and audit entries stay.
* Conversations still assigned to them go back to the queue within an hour. Whether someone picks them up then depends on your auto-assignment settings.
* [Adding](https://docs.connectly.ai/user-management-api/add-user.md) the same email later brings them back with the same `id` (`CREATE_USER_OUTCOME_MEMBERSHIP_REVIVED`).

***

## Error responses

| HTTP status | `errorCode` | Meaning |
| - | - | - |
| `400` | `PRFL.USR.OWNER_PROTECTED` | The user is an Owner. Remove Owners in the dashboard. |
| `404` | `PRFL.NOT_FOUND` | The user is not a current user of the business, including someone already removed. |

See [Errors](https://docs.connectly.ai/user-management-api/overview.md#errors) for the responses every endpoint can return.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.