# POST /api/v1/expense-reports

> Create expense report

- **Tag:** expense-reports
- **Operation ID:** `create_expense_report_api_v1_expense_reports_post`

## Description

Create a draft expense report with line items.

## Authentication

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

## Request body

Schema: `ExpenseReportCreateRequest`

- `title` (string)
- `description` (string)
- `currency` (string)
- `lines` (array · ExpenseReportLineInput · required) → `ExpenseReportLineInput`
  - `description` (string · required)
  - `amount` (integer · required) — Amount in cents
  - `expense_date` (string · date · required) — Date expense was incurred
  - `s3_key` (string) — Receipt attachment S3 key
  - `ledger_id` (string) — Expense category ledger

## Responses

### 201 — Successful Response

Schema: `SuccessEnvelope_ExpenseReportDetailResponse_`

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

### 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/expense-reports' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "lines": []
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/expense-reports', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "lines": []
}),
});
const data = await response.json();
```

### Python

```python
import httpx

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

payload = {
  "lines": []
}

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

## See also

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