# Send invoice by email

`POST /api/invoices/{id}/send`

Emails the invoice to the customer using Perfex's own invoice email template, PDF attachment and SMTP configuration, and marks the invoice as sent. Requires the Invoices "Send email" permission. Send an Idempotency-Key header to make retries safe. The customer must have at least one contact flagged to receive invoice emails, and Setup -> Email (SMTP) must be configured or nothing is sent.

- **Group:** Invoices
- **Since:** v3.0.2
- **Authentication:** `authtoken` header, created under Setup > API > API Management
- **HTML version:** /apiguide/invoices/send-invoice/

## Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `authtoken` | String | **required** | Authentication token, generated from admin area |

## Parameters

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cc` | String | optional | Optional comma-separated CC email addresses. |

## Example request

```bash
curl -X POST "https://yoursite.com/api/invoices/123/send" \
  -H "authtoken: YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "field": "value" }'
```

## Success response

### Success-Response:

```json
HTTP/1.1 200 OK
{
  "status": true,
  "invoice_id": "847",
  "invoice_number": "INV-000832",
  "sent": true,
  "datesend": "2026-07-30 14:05:11",
  "message": "Invoice sent to the customer."
}
```

## Error responses

### Not-Sent:

```json
HTTP/1.1 500 Internal Server Error
{
  "status": false,
  "invoice_id": "847",
  "sent": false,
  "message": "Invoice could not be sent. Check SMTP settings and that the customer has a contact set to receive invoice emails."
}
```

---

Perfex CRM REST API by Themesic Interactive. Full reference: /apiguide/
