API v1
API reference
The Dunbill API lets you create clients and invoices from your own tools. It's a JSON REST API at https://api.dunbill.cc/v1. API access is included in the Agency plan.
Authentication
Create a key in Settings → API keys in the Dunbill app and send it as a bearer token. Keys starting db_live_ act on real data; db_test_ keys use a separate test workspace.
curl https://api.dunbill.cc/v1/invoices \
-H "Authorization: Bearer db_live_..."
Invoices
| Method | Path | What it does |
|---|---|---|
| GET | /v1/invoices | List invoices, newest first. Filter with status and client_id. |
| GET | /v1/invoices/{id} | One invoice with its line items and payments. |
| POST | /v1/invoices | Create a draft invoice. |
| POST | /v1/invoices/{id}/send | Email the invoice to the client. |
{
"id": "inv_2Qf81",
"number": "DB-04821",
"client_id": "cli_8Hx2",
"currency": "USD",
"total": 4200.00,
"status": "sent",
"due_date": "2026-12-15"
}
Clients
| Method | Path | What it does |
|---|---|---|
| GET | /v1/clients | List clients. |
| POST | /v1/clients | Create a client. |
Webhooks
Add an endpoint in Settings → Webhooks. We send invoice.paid, invoice.overdue and payment.failed, signed with an HMAC-SHA256 header Dunbill-Signature.
Limits
100 requests per minute per key. Over the limit you get 429 with a Retry-After header.