curl --request POST \
--url https://api.example.com/api/categories \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": {},
"isFixed": true,
"color": "<string>",
"icon": "<string>",
"parentId": "<string>"
}
'{
"id": "<string>",
"userId": "<string>",
"name": "<string>",
"type": "<string>",
"isFixed": true,
"color": "<string>",
"icon": "<string>",
"parentId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>"
}Create a new custom category with optional hierarchical structure
curl --request POST \
--url https://api.example.com/api/categories \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": {},
"isFixed": true,
"color": "<string>",
"icon": "<string>",
"parentId": "<string>"
}
'{
"id": "<string>",
"userId": "<string>",
"name": "<string>",
"type": "<string>",
"isFixed": true,
"color": "<string>",
"icon": "<string>",
"parentId": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"deletedAt": "<string>"
}POST /api/categories
Authorization: Bearer <token> header.
INCOME - For income transactionsEXPENSE - For expense transactionsBOTH - Can be used for both income and expenses#FF5733). Must match pattern ^#[0-9A-Fa-f]{6}$INCOME, EXPENSE, or BOTH){
"name": "Streaming Services",
"type": "EXPENSE",
"isFixed": true,
"color": "#9B59B6",
"icon": "tv",
"parentId": "550e8400-e29b-41d4-a716-446655440000"
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"userId": "user-uuid-here",
"name": "Streaming Services",
"type": "EXPENSE",
"isFixed": true,
"color": "#9B59B6",
"icon": "tv",
"parentId": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "2026-03-04T10:30:00.000Z",
"updatedAt": "2026-03-04T10:30:00.000Z",
"deletedAt": null
}
{
"statusCode": 409,
"message": "Category \"Streaming Services\" already exists"
}
{
"statusCode": 404,
"message": "Parent category not found"
}
{
"statusCode": 400,
"message": "Nesting limit reached. Cannot create a subcategory of a subcategory."
}