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

NameTypeRequiredDescription
pageIndexintegerRequiredZero-based page index for pagination.
pageSizeintegerRequiredNumber of items per page (1-100).
workspaceIdstring (UUID)RequiredWorkspace identifier.
searchTermstring—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

NameTypeRequiredDescription
workspaceIdstring (UUID)RequiredWorkspace identifier.
namestringRequiredReusable 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

NameTypeRequiredDescription
idstring (UUID)RequiredUnique identifier (UUID v4).
namestringRequired

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

NameTypeRequiredDescription
idstring (UUID)RequiredUnique identifier (UUID v4).

Response

Returns { data, _meta } with the result.