curl --request PATCH \
--url https://api.example.com/api/categories/:id \
--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>"
}Update an existing category with partial data
curl --request PATCH \
--url https://api.example.com/api/categories/:id \
--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>"
}PATCH /api/categories/:id
Authorization: Bearer <token> header.
INCOMEEXPENSEBOTH#FF5733). Must match pattern ^#[0-9A-Fa-f]{6}${
"name": "Video Streaming",
"color": "#3498DB",
"isFixed": true
}
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"userId": "user-uuid-here",
"name": "Video Streaming",
"type": "EXPENSE",
"isFixed": true,
"color": "#3498DB",
"icon": "tv",
"parentId": "550e8400-e29b-41d4-a716-446655440000",
"createdAt": "2026-03-04T10:30:00.000Z",
"updatedAt": "2026-03-04T11:45:00.000Z",
"deletedAt": null
}
{
"statusCode": 404,
"message": "Category not found"
}
{
"statusCode": 409,
"message": "Category \"Video Streaming\" already exists"
}
{
"statusCode": 400,
"message": "Invalid parent category"
}
{
"statusCode": 400,
"message": "Category cannot be its own parent"
}
{
"name": "Subscriptions"
}
{
"color": "#FF5733",
"icon": "star"
}
{
"parentId": "new-parent-uuid"
}
{
"parentId": null
}