# POST /api/v1/billing/ai/pause

> Pause Ai Features

- **Tag:** billing
- **Operation ID:** `pause_ai_features_api_v1_billing_ai_pause_post`

## Description

Pause all AI features for the authenticated business.

Sets ``businesses.ai_paused_at`` so:
- ``check_ai_quota`` returns ``allowed=False, paused=True`` for any
  subsequent AI call (chat, panels, OCR, etc.).
- ``track_business_usage`` short-circuits, stopping the Stripe
  overage fire-and-forget.
- ``AITransactionCleaner`` downshifts to rule-only cleaning during
  Plaid sync (no LLM calls).

Idempotent. Returns the refreshed AI usage payload so the widget /
banner can transition to the paused state without a second
round-trip.

## Authentication

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

## Responses

### 201 — 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 POST 'https://api.ondayzero.com/api/v1/billing/ai/pause' \
  -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/billing/ai/pause', {
  method: 'POST',
  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.post("https://api.ondayzero.com/api/v1/billing/ai/pause", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/billing/pause-ai-features
- OpenAPI slice: https://www.ondayzero.com/docs/reference/billing/pause-ai-features/openapi.json
- Other endpoints in **billing**: https://www.ondayzero.com/docs/reference/billing
