API Reference

Expenses

Create, list, update, and delete business expenses via the Rebill API. Includes the full expense object schema, filtering options, and category management endpoints.

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 parameterTypeDescription
fromdateStart of date range (YYYY-MM-DD). Must be used with to.
todateEnd of date range (YYYY-MM-DD). Must be used with from.
category_idstringFilter by expense category ID
client_idstringFilter by client ID (billable expenses)
billablebooleanFilter 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

FieldTypeDescription
idstringUnique identifier
createdtimestampWhen the expense was created
updated_attimestampWhen the expense was last updated
datetimestampDate the expense was incurred
amountintegerExpense amount in cents
tax_amountintegerTax portion in cents (optional, 0 if not set)
category_idstringID of the expense category
supplier_namestringName of the supplier or vendor
notesstringAdditional notes (optional)
payment_methodstringcash · card · bank_transfer · other
billablebooleanWhether the expense is billable to a client
tax_deductiblebooleanWhether the expense is tax deductible
client_idstringClient ID (only present when billable)

Create an expense

POST /expense
FieldRequiredTypeDescription
dateYesdateDate the expense was incurred (YYYY-MM-DD)
amountYesintegerAmount in cents (must be greater than 0)
category_idYesstringID of an existing expense category
supplier_nameYesstringName of the supplier or vendor
payment_methodYesstringcash, card, bank_transfer, or other
tax_amountNointegerTax portion in cents
notesNostringAdditional notes
billableNobooleanWhether this expense is billable to a client
tax_deductibleNobooleanWhether the expense is tax deductible
client_idNostringClient 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"

Was this article helpful?