# POST /api/v1/invoices/{invoice_id}/send

> Send invoice via email

- **Tag:** invoices
- **Operation ID:** `send_invoice_email_api_v1_invoices__invoice_id__send_post`

## Description

Send an invoice to the customer via email. Optionally attach the PDF and CC the sender.

## Authentication

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

## Parameters

- `invoice_id` (path, string · uuid, required)

## Responses

### 201 — Successful Response

Schema: `InvoiceSendEmailResponse`

- `success` (boolean · required) — Whether the email was sent successfully.
- `invoice_id` (string · required) — UUID of the invoice sent.
- `invoice_number` (string · required) — Invoice number (e.g., INV-001).
- `customer_email` (string · required) — Email address the invoice was sent to.
- `cc_email` (string) — Email address that was CC'd (if cc_sender was true).
- `message_id` (string) — SES message ID for tracking.
- `pdf_attached` (boolean) — Whether the PDF was attached to the email.

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 409 — Conflict - Resource already exists

### 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/invoices/{invoice_id}/send' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d ''
```

### JavaScript

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

### Python

```python
import httpx

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

payload = {}

response = httpx.post("https://api.ondayzero.com/api/v1/invoices/{invoice_id}/send", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/invoices/send-invoice-email
- OpenAPI slice: https://www.ondayzero.com/docs/reference/invoices/send-invoice-email/openapi.json
- Other endpoints in **invoices**: https://www.ondayzero.com/docs/reference/invoices
