# POST /api/v1/bills

> Create bill

- **Tag:** bills
- **Operation ID:** `create_bill_api_v1_bills_post`

## Description

Create a new bill in draft status. Optionally include 'recurring' config to also create a recurring template.

## Authentication

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

## Request body

Schema: `BillCreateRequest`

- `description` (string) — Description of what the bill is for.
- `currency` (string) — Currency for the bill (USD, CAD, AUD, EUR, or GBP). Defaults to business default.
- `vendor_id` (string) — UUID of the vendor this bill is from.
- `bill_number` (string) — Bill/invoice number from the vendor. Auto-generated if not provided.
- `type` (string) — Bill type: 'recurring' (monthly rent, subscriptions) or 'one_time'.
- `expected_amount` (integer) — Expected bill amount in cents.
- `expected_paid_on_date` (string · date-time | string) — Expected payment date (ISO 8601 format).
- `s3_key` (string) — S3 key of uploaded bill document (PDF/image).
- `recurring` (RecurringConfig) — If provided, creates a recurring template for this bill.
- `submitted_for_review` (boolean) — When true, marks this draft as a client-submitted expense and notifies the assigned advisor to confirm or deny it.

## Responses

### 201 — Successful Response

Schema: `SuccessEnvelope_BillResponse_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (BillResponse)

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 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/bills' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "description": "string",
  "currency": "string",
  "vendor_id": "string",
  "bill_number": "string",
  "type": "string",
  "expected_amount": 0
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/bills', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "description": "string",
  "currency": "string",
  "vendor_id": "string",
  "bill_number": "string",
  "type": "string",
  "expected_amount": 0
}),
});
const data = await response.json();
```

### Python

```python
import httpx

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

payload = {
  "description": "string",
  "currency": "string",
  "vendor_id": "string",
  "bill_number": "string",
  "type": "string",
  "expected_amount": 0
}

response = httpx.post("https://api.ondayzero.com/api/v1/bills", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/bills/create-bill
- OpenAPI slice: https://www.ondayzero.com/docs/reference/bills/create-bill/openapi.json
- Other endpoints in **bills**: https://www.ondayzero.com/docs/reference/bills
