Expense categories
Manage reusable workspace-owned expense categories for spend tracking and reporting.
Authentication required
All endpoints require a Bearer token in the
Authorization header. See the Authentication guide for setup instructions.GET /v1/expense-categories
List reusable expense categories with usage counts and recorded spend, ordered by any column.
bash
GET /v1/expense-categories?page_index=0&page_size=25&workspace_id=1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01
Authorization: Bearer {token}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| pageIndex | integer | Required | Zero-based page index for pagination. |
| pageSize | integer | Required | Number of items per page (1-100). |
| workspaceId | string (UUID) | Required | Workspace identifier. |
| searchTerm | string | — | Free-text search term to filter results (max 200 characters). |
| sortBy | 'name' | 'expenseCount' | 'totalSpend' | 'createdAt' | — | Expense category field to sort by. |
| sortDirection | 'asc' | 'desc' | — | Sort direction: ascending or descending. |
Response
Returns { items, totalCount, facets, _meta } with paginated results.
POST /v1/expense-categories
Create a reusable workspace-owned expense category while adding or editing expenses.
bash
POST /v1/expense-categories
Authorization: Bearer {token}
Content-Type: application/json
{
"workspace_id": "1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01",
"name": "My Campaign"
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workspaceId | string (UUID) | Required | Workspace identifier. |
| name | string | Required | Reusable expense category name. |
Response
Returns { data, _meta } with the result.
PATCH /v1/expense-categories/:id
Update a reusable expense category name across every spend that uses it.
bash
PATCH /v1/expense-categories/:id
Authorization: Bearer {token}
Content-Type: application/json
{
"name": "My Campaign"
}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Required | Unique identifier (UUID v4). |
| name | string | Required |
Response
Returns { data, _meta } with the result.
DELETE /v1/expense-categories/:id
Remove an unused expense category; categories still used by live spend are blocked.
bash
DELETE /v1/expense-categories/:id
Authorization: Bearer {token}Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Required | Unique identifier (UUID v4). |
Response
Returns { data, _meta } with the result.