# DELETE /api/v1/businesses/users/{user_id}

> Remove user from business

- **Tag:** businesses
- **Operation ID:** `remove_user_from_business_api_v1_businesses_users__user_id__delete`

## Description

Remove a user from a specific business.

IMPORTANT: This endpoint removes the user-business association ONLY.
The user record itself remains in the database and can still be associated with other businesses.

To completely delete a user from the system, use DELETE /users/{user_id} instead.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `user_id` (path, string, required)

## Responses

### 204 — Successful Response

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X DELETE 'https://api.ondayzero.com/api/v1/businesses/users/{user_id}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/businesses/users/{user_id}', {
  method: 'DELETE',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.delete("https://api.ondayzero.com/api/v1/businesses/users/{user_id}", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/businesses/remove-user-from-business
- OpenAPI slice: https://www.ondayzero.com/docs/reference/businesses/remove-user-from-business/openapi.json
- Other endpoints in **businesses**: https://www.ondayzero.com/docs/reference/businesses
