> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cleo-pay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send an invoice

> POST /v1/invoices/{invoiceId}/send finalizes a draft if needed and emails the customer the hosted pay link.

```
POST /v1/invoices/{invoiceId}/send
```

**Scope:** `invoices:write`  ·  **Idempotency-Key:** optional

Finalizes a draft (which turns its link on), then emails the pay link. You can send an open invoice again as a reminder. Each send fires an `invoice.sent` event.

<ParamField path="invoiceId" type="string" required>The invoice.</ParamField>
<ParamField body="emails" type="string[]">Recipients. Default: the customer's email on file.</ParamField>
<ParamField body="subject" type="string">Default: "Invoice \<number> from \<business>".</ParamField>
<ParamField body="message" type="string">Text shown in the email body.</ParamField>

```bash theme={null}
curl -X POST https://api.stg.cleo-pay.com/v1/invoices/d7e8f9a0-b1c2-4d3e-8f4a-5b6c7d8e9f0a/send \
  --header "Authorization: Bearer $CLEO_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{ "emails": ["ap@northwind.example"] }'
```

## Response

`200` with the [invoice](/api-reference/invoices/get). The email does not attach a PDF; the hosted page offers it.

## Errors

| Code | When |
| - | - |
| `validation_error` | The invoice cannot be sent in its status (for example `paid` or `void`), finalizing left it blocked, or the customer has no email and you sent no `emails`. |
| `payments_locked`, `setup_incomplete`, `setup_required`, `feature_unavailable` | The business cannot receive yet. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.