POST /api/categories/seed
Create a predefined set of default categories for the authenticated user. This is useful for new users to get started quickly with common expense and income categories.Authentication
This endpoint requires a valid JWT token in the Authorization header.Request Body
No request body required. The endpoint creates a predefined set of categories.Response
Returns an array of created categories.Array of created category objects
Example Request
cURL
JavaScript
Example Response
Default Categories Created
The seed endpoint creates the following default category structure:Income Categories
- Salary - Regular employment income
- Freelance - Self-employment income
- Investments - Dividends and capital gains
- Other Income - Miscellaneous income
Expense Categories
- Housing (Fixed)
- Rent
- Utilities
- Maintenance
- Food & Dining (Variable)
- Groceries
- Restaurants
- Transportation (Variable)
- Public Transit
- Fuel
- Vehicle Maintenance
- Entertainment (Variable)
- Healthcare (Variable)
- Shopping (Variable)
- Bills (Fixed)
The exact categories created may vary based on the implementation in the source code. Check the
categories.service.ts seed method for the current list.Error Responses
400 - Categories Already Exist
400 - Categories Already Exist
401 - Unauthorized
401 - Unauthorized
When to Use
New User Onboarding
Automatically set up categories for new users during registration
Quick Start
Help users start tracking expenses immediately without manual setup
Related Endpoints
Create Category
Create custom categories
List Categories
View all categories
