# POST /api/v1/billing/firm/change-tier

> Change Firm Tier

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

## Description

Upgrade or downgrade the firm's plan tier, in-app.

Swaps the per-client price, adds/removes the platform fee, and re-applies
the current client quantity in one prorated Stripe update. Requires the
caller to be an owner/admin of the firm. Blocks a downgrade that would drop
the firm below its current client count.

## Authentication

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

## Request body

Schema: `FirmTierChangeRequest`

- `firm_plan_tier` (string · required) — Target firm tier: 'firm_starter', 'firm_professional', or 'firm_enterprise'.

## 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/firm/change-tier' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "firm_plan_tier": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/billing/firm/change-tier', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "firm_plan_tier": "string"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

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

payload = {
  "firm_plan_tier": "string"
}

response = httpx.post("https://api.ondayzero.com/api/v1/billing/firm/change-tier", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/billing/change-firm-tier
- OpenAPI slice: https://www.ondayzero.com/docs/reference/billing/change-firm-tier/openapi.json
- Other endpoints in **billing**: https://www.ondayzero.com/docs/reference/billing
