Guides
API Integration
Build integrations using the dubbl REST API.
Creating an API Key
- Navigate to Settings → API Keys
- Click Create API Key
- Copy the key — it won't be shown again
Making Requests
Include the API key and organization ID in every request:
curl -X GET \
-H "Authorization: Bearer your-api-key-here" \
-H "x-organization-id: your-org-id" \
https://your-instance.com/api/v1/contactsExample: Create an Invoice
curl -X POST \
-H "Authorization: Bearer your-api-key" \
-H "x-organization-id: your-org-id" \
-H "Content-Type: application/json" \
-d '{
"contactId": "contact-id",
"issueDate": "2026-03-01",
"dueDate": "2026-03-31",
"lines": [
{
"description": "Web Development",
"quantity": 100,
"unitPrice": 15000,
"accountId": "revenue-account-id"
}
]
}' \
https://your-instance.com/api/v1/invoicesExample: List Contacts with Filtering
# Search for customers
curl -H "Authorization: Bearer your-api-key" \
-H "x-organization-id: your-org-id" \
"https://your-instance.com/api/v1/contacts?type=customer&search=acme&page=1&limit=20"Pagination
List endpoints support pagination:
| Parameter | Default | Description |
|---|---|---|
page | 1 | Page number |
limit | 20 | Items per page (max 100) |
Response includes pagination metadata:
{
"data": [...],
"pagination": {
"page": 1,
"limit": 20,
"total": 45,
"totalPages": 3
}
}Error Handling
API errors return appropriate HTTP status codes:
| Code | Description |
|---|---|
| 400 | Validation error (check error field) |
| 401 | Missing or invalid authentication |
| 403 | Insufficient permissions |
| 404 | Resource not found |
| 500 | Internal server error |
Permissions
API key access inherits the creating user's role. Available permissions:
manage:contacts— CRUD contactsmanage:invoices— CRUD invoicesapprove:invoices— Send/void invoicesmanage:bills— CRUD billsmanage:banking— Bank account operationsmanage:expenses— Expense claimsapprove:expenses— Approve/reject expensesmanage:inventory— Inventory operationsmanage:projects— Project managementmanage:assets— Fixed asset operationsmanage:payroll— Payroll managementmanage:budgets— Budget operationsview:audit-log— Read audit trail