Skip to main content
POST
/
budget
curl -X POST https://api.homeaccount.com/budget \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-CSRF-Token: YOUR_CSRF_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "123e4567-e89b-12d3-a456-426614174000",
    "category_id": "987fcdeb-51a2-43d7-9f12-345678901234",
    "amount": 50000,
    "period": "monthly",
    "alert_threshold": 85
  }'
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "account_id": "123e4567-e89b-12d3-a456-426614174000",
    "category_id": "987fcdeb-51a2-43d7-9f12-345678901234",
    "amount": 50000,
    "period": "monthly",
    "alert_threshold": 85,
    "created_at": "2026-03-05T10:30:00.000Z",
    "updated_at": "2026-03-05T10:30:00.000Z"
  }
}
Creates a budget to track spending limits for a specific category. Each category can only have one budget. Budgets support weekly, monthly, and yearly periods with configurable alert thresholds.

Request Body

account_id
string
required
The UUID of the account this budget belongs to
category_id
string
required
The UUID of the category to budget for. Each category can only have one budget.
amount
number
required
The budget amount in cents. Must be a positive integer between 1 and 90000000 (900,000€)
period
string
required
The budget period. Must be one of:
  • weekly - Budget resets every week
  • monthly - Budget resets every month
  • yearly - Budget resets every year
alert_threshold
number
default:"80"
The percentage at which to trigger spending alerts. Must be between 50 and 100. Defaults to 80.

Response

success
boolean
Indicates if the request was successful
data
object
The created budget object
curl -X POST https://api.homeaccount.com/budget \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-CSRF-Token: YOUR_CSRF_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "123e4567-e89b-12d3-a456-426614174000",
    "category_id": "987fcdeb-51a2-43d7-9f12-345678901234",
    "amount": 50000,
    "period": "monthly",
    "alert_threshold": 85
  }'
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "account_id": "123e4567-e89b-12d3-a456-426614174000",
    "category_id": "987fcdeb-51a2-43d7-9f12-345678901234",
    "amount": 50000,
    "period": "monthly",
    "alert_threshold": 85,
    "created_at": "2026-03-05T10:30:00.000Z",
    "updated_at": "2026-03-05T10:30:00.000Z"
  }
}

Error Codes

  • 400 - Invalid request parameters or budget already exists for category
  • 401 - Missing or invalid authentication token
  • 403 - Invalid CSRF token
  • 500 - Internal server error

Build docs developers (and LLMs) love