Skip to main content
PUT
/
expense-categories
/
{id}
curl -X PUT "https://api.contazen.ro/v1/expense-categories/25" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Digital Marketing"
  }'
{
  "success": true,
  "category": {
    "id": 25,
    "name": "Digital Marketing",
    "parent_id": 0,
    "is_default": false,
    "is_visible": true,
    "type": "custom"
  },
  "message": "Category updated successfully"
}

Documentation Index

Fetch the complete documentation index at: https://docs.contazen.ro/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Update Expense Category endpoint allows you to modify existing custom expense categories. You can update the name, parent category, and visibility settings. Important Limitations:
  • You can only update custom categories that you created
  • System default categories cannot be modified via the API
  • Categories that belong to your firm only

Path Parameters

id
integer
required
The unique identifier of the expense category to update

Request Body

All parameters are optional - only include the fields you want to update.
name
string
The new name for the expense category
parent_id
integer
New parent category ID. Use 0 to make it a root-level category, or specify an existing category ID to move it under that parent.
is_visible
boolean
Whether the category should be visible and available for use when creating expenses

Validation Rules

  • Name: Must be non-empty if provided
  • Parent Category: Must exist and belong to your firm (if specified)
  • Hierarchy: Cannot create circular references or exceed 2-level depth
  • Self-Reference: A category cannot be its own parent
  • System Categories: Cannot update categories with type: "system"

Hierarchy Constraints

  • Maximum Depth: Categories can only be 2 levels deep (category → subcategory)
  • Parent Validation: Parent must be a root-level category (parent_id = 0)
  • Circular Reference: Prevents categories from referencing themselves or creating loops

Response

category
object
The updated expense category object
message
string
Success message confirming the category update
curl -X PUT "https://api.contazen.ro/v1/expense-categories/25" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Digital Marketing"
  }'
{
  "success": true,
  "category": {
    "id": 25,
    "name": "Digital Marketing",
    "parent_id": 0,
    "is_default": false,
    "is_visible": true,
    "type": "custom"
  },
  "message": "Category updated successfully"
}

Authorizations

Authorization
string
header
required

Use your API key (sk_live_xxx or sk_test_xxx)

Path Parameters

id
integer
required

Category ID

Body

application/json
name
string
parent_id
integer
is_visible
enum<integer>
Available options:
0,
1

Response

Category updated

success
boolean
data
object
meta
object