API Reference

Recurring expenses API

Create and manage recurring expense templates via the Rebill API. Covers the schedule model, the premium gate, and the activate/deactivate lifecycle.

Last updated

Recurring expenses are templates that automatically create Expense records on a schedule (weekly, monthly, or yearly), such as rent, software subscriptions, or a retainer paid to a supplier. The schedule model mirrors recurring invoices: an interval, an optional monthly anchor day, and account-timezone-local next-run dates.

Premium feature

Recurring expenses are a premium feature. POST /recurring_expense, PUT /recurring_expense/:id, and PUT /recurring_expense/:id/activate all return 402 Payment Required on a free-plan account. Listing, reading, deactivating, and deleting templates are not gated, so a downgraded account can still see, pause, and remove existing templates; it just can't create new ones, edit them, or turn them back on.

List recurring expenses

GET /recurring_expense

Returns every recurring expense template on the account, active or inactive.

curl https://api.rebill.co.za/recurring_expense \
  -H "Authorization: Bearer sk_your_secret_key"

Response:

{
  "recurring_expenses": [
    {
      "id": "rex_001",
      "created": "2026-03-01T00:00:00Z",
      "active": true,
      "start_date": "2026-03-01T00:00:00Z",
      "next_date": "2026-04-01T00:00:00Z",
      "interval": "month",
      "interval_amount": 1,
      "amount": 45000,
      "currency": "ZAR",
      "category_id": "cat-002",
      "payment_method": "bank_transfer",
      "billable": false,
      "tax_deductible": true,
      "supplier_name": "WeWork Cape Town"
    }
  ]
}

Get a recurring expense

GET /recurring_expense/:id

Returns a single recurring expense template by ID.

Recurring expense object

FieldTypeDescription
idstringUnique identifier
createdtimestampWhen the template was created
activebooleanWhether the schedule is currently running
start_datetimestampDate the schedule begins
end_datetimestampDate the schedule ends (optional; runs indefinitely if absent)
next_datetimestampWhen the next expense will be generated (absent while inactive)
intervalstringRecurrence unit: week · month · year
interval_amountintegerNumber of intervals between expenses (e.g. 2 + month = every 2 months)
monthly_anchorstringWhich day of the month expenses are generated (see Monthly anchor in the Recurring invoices section for the full value list)
monthly_anchor_dayintegerUsed when monthly_anchor is specific_day (1 to 31)
amountintegerAmount in cents, prefilled onto every generated expense
currencystringISO 4217 currency code
tax_amountintegerTax portion in cents (optional, 0 if not set)
category_idstringID of the expense category applied to generated expenses
payment_methodstringcash · card · bank_transfer · other
billablebooleanWhether generated expenses are billable to a client
tax_deductiblebooleanWhether generated expenses are tax deductible
client_idstringClient ID (only present when billable)
supplier_namestringFree-text supplier or vendor name prefilled onto generated expenses
notesstringNotes prefilled onto generated expenses

Create a recurring expense

POST /recurring_expense
FieldRequiredTypeDescription
start_dateYesdateDate the schedule begins (YYYY-MM-DD)
intervalYesstringRecurrence unit: week · month · year
interval_amountYesintegerNumber of intervals between expenses (must be > 0)
amountYesintegerAmount in cents (must be greater than 0)
category_idYesstringID of an existing expense category
supplier_nameYesstringFree-text supplier or vendor name
payment_methodYesstringcash, card, bank_transfer, or other
end_dateNodateDate the schedule ends; omit for indefinite
monthly_anchorNostringsame_day (default) · first_day · last_day · specific_day · last_day_offset
monthly_anchor_dayNointegerUsed when monthly_anchor is specific_day (1 to 31)
currencyNostringISO 4217 code; defaults to your account currency
tax_amountNointegerTax portion in cents
notesNostringNotes to prefill on each generated expense
billableNobooleanWhether generated expenses are billable to a client
tax_deductibleNobooleanWhether generated expenses are tax deductible
client_idNostringClient ID if billable
activate_immediatelyNobooleanActivate the schedule as soon as it is created (default: false, created paused)
schedule_initial_nowNobooleanWith activate_immediately, generate the first expense synchronously on create instead of waiting for its natural next-run date
curl -X POST https://api.rebill.co.za/recurring_expense \
  -H "Authorization: Bearer sk_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "start_date": "2026-03-01",
    "interval": "month",
    "interval_amount": 1,
    "amount": 45000,
    "category_id": "cat-002",
    "supplier_name": "WeWork Cape Town",
    "payment_method": "bank_transfer",
    "tax_deductible": true,
    "activate_immediately": true
  }'

Response (201 Created):

{
  "id": "rex_001"
}

Free plan accounts receive 402 Payment Required.

Update a recurring expense

PUT /recurring_expense/:id

Replaces the schedule and payload of a recurring expense. Accepts the same fields as create (excluding activate_immediately and schedule_initial_now, which only apply at creation). Only inactive templates can be updated: deactivate first, then update, then activate again. Attempting to update an active template returns 422 Unprocessable. Free plan accounts receive 402 Payment Required.

Delete a recurring expense

DELETE /recurring_expense/:id

Permanently deletes a recurring expense template. Expenses it already generated are unaffected.

curl -X DELETE https://api.rebill.co.za/recurring_expense/rex_001 \
  -H "Authorization: Bearer sk_your_secret_key"

Activate a recurring expense

PUT /recurring_expense/:id/activate

Turns the schedule on and computes the next run date. Free plan accounts receive 402 Payment Required.

curl -X PUT https://api.rebill.co.za/recurring_expense/rex_001/activate \
  -H "Authorization: Bearer sk_your_secret_key"

Deactivate a recurring expense

PUT /recurring_expense/:id/deactivate

Pauses the schedule and clears its next run date. No new expenses will be generated until it is activated again. Allowed on free-plan accounts, so a downgraded account can still pause its existing templates.

curl -X PUT https://api.rebill.co.za/recurring_expense/rex_001/deactivate \
  -H "Authorization: Bearer sk_your_secret_key"

Was this article helpful?

Still need help?

Our support team is happy to help you get the most out of Rebill.

Contact support