Expenses let you track business costs alongside your invoice revenue. Each expense belongs to a category, has a supplier name, amount, and optional tax and client fields.
List expenses
GET /expense
Returns all expenses for your account, sorted by date descending. Use query parameters to filter the results.
| Query parameter | Type | Description |
|---|---|---|
| from | date | Start of date range (YYYY-MM-DD). Must be used with to. |
| to | date | End of date range (YYYY-MM-DD). Must be used with from. |
| category_id | string | Filter by expense category ID |
| client_id | string | Filter by client ID (billable expenses) |
| billable | boolean | Filter by billable status (true or false) |
curl "https://rebill-api-896466068278.africa-south1.run.app/expense?from=2026-01-01&to=2026-03-31" \ -H "Authorization: Bearer sk_your_secret_key"
Response:
{
"expenses": [
{
"id": "exp-001",
"created": "2026-03-10T08:00:00Z",
"updated_at": "2026-03-10T08:00:00Z",
"date": "2026-03-10T00:00:00Z",
"amount": 45000,
"tax_amount": 6522,
"category_id": "cat-002",
"supplier_name": "BP Garage Stellenbosch",
"notes": "Fuel for client visit",
"payment_method": "card",
"billable": true,
"tax_deductible": true,
"client_id": "xyz789"
}
]
}Get an expense
GET /expense/:id
Returns a single expense by ID.
curl https://rebill-api-896466068278.africa-south1.run.app/expense/exp-001 \ -H "Authorization: Bearer sk_your_secret_key"
Expense object
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier |
| created | timestamp | When the expense was created |
| updated_at | timestamp | When the expense was last updated |
| date | timestamp | Date the expense was incurred |
| amount | integer | Expense amount in cents |
| tax_amount | integer | Tax portion in cents (optional, 0 if not set) |
| category_id | string | ID of the expense category |
| supplier_name | string | Name of the supplier or vendor |
| notes | string | Additional notes (optional) |
| payment_method | string | cash · card · bank_transfer · other |
| billable | boolean | Whether the expense is billable to a client |
| tax_deductible | boolean | Whether the expense is tax deductible |
| client_id | string | Client ID (only present when billable) |
Create an expense
POST /expense
| Field | Required | Type | Description |
|---|---|---|---|
| date | Yes | date | Date the expense was incurred (YYYY-MM-DD) |
| amount | Yes | integer | Amount in cents (must be greater than 0) |
| category_id | Yes | string | ID of an existing expense category |
| supplier_name | Yes | string | Name of the supplier or vendor |
| payment_method | Yes | string | cash, card, bank_transfer, or other |
| tax_amount | No | integer | Tax portion in cents |
| notes | No | string | Additional notes |
| billable | No | boolean | Whether this expense is billable to a client |
| tax_deductible | No | boolean | Whether the expense is tax deductible |
| client_id | No | string | Client ID if the expense is billable |
curl -X POST https://rebill-api-896466068278.africa-south1.run.app/expense \
-H "Authorization: Bearer sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"date": "2026-03-10",
"amount": 45000,
"tax_amount": 6522,
"category_id": "cat-002",
"supplier_name": "BP Garage Stellenbosch",
"payment_method": "card",
"billable": true,
"tax_deductible": true,
"client_id": "xyz789",
"notes": "Fuel for client visit"
}'Response (201 Created):
{
"id": "exp-001"
}Free plan accounts are limited to 20 expenses. Attempting to create more returns 402 Payment Required.
Update an expense
PUT /expense/:id
Updates an existing expense. All fields are optional — only the fields you include in the request body will be updated.
curl -X PUT https://rebill-api-896466068278.africa-south1.run.app/expense/exp-001 \
-H "Authorization: Bearer sk_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"amount": 50000,
"notes": "Updated amount after receipt"
}'Response (200 OK): returns the full updated expense object.
Delete an expense
DELETE /expense/:id
Permanently deletes an expense.
curl -X DELETE https://rebill-api-896466068278.africa-south1.run.app/expense/exp-001 \ -H "Authorization: Bearer sk_your_secret_key"