Skip to content

Create a category

Request

Creates a new custom category (custom: true) for the business. The name must be unique within the business.

Security
BearerAuth
Path
client_idintegerrequired

The ID of the business.

Example:123
Bodyapplication/jsonrequired
namestring, <= 128 charactersrequired

The display name for the new custom category. Must be unique within the business.

Example:"Internal Events"
accounting_code_idstring or null, (uuid)

The ID of a GL code to map to this category. Must belong to the same business. Omit to create without a mapping.

Example:"3fa85f64-5717-4562-b3fc-2c963f66afa6"
POST
/v1/businesses/{client_id}/categories
curl -i -X POST \
  https://public.letsweel.com/v1/businesses/123/categories \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Internal Events",
    "accounting_code_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }'

Responses

Created

Bodyapplication/json
idstring, (uuid)

The unique identifier for this category.

Example:"7cb19e45-1234-5678-abcd-ef9876543210"
namestring

The display name of the category.

Example:"Travel"
customboolean

Whether this is a custom category created by the business. System-defined categories have custom: false.

Example:false
enabledboolean

Whether this category is available for use on transactions.

Example:true
accounting_code_idstring or null, (uuid)

The ID of the GL code mapped to this category, or null if no mapping exists.

Example:"3fa85f64-5717-4562-b3fc-2c963f66afa6"
createdstring, (date-time)

When this category was created in UTC.

Example:"2025-01-01T00:00:00Z"
updatedstring, (date-time)

When this category was last updated in UTC.

Example:"2025-01-01T00:00:00Z"
Response
{ "id": "7cb19e45-1234-5678-abcd-ef9876543210", "name": "Travel", "custom": false, "enabled": true, "accounting_code_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "created": "2025-01-01T00:00:00Z", "updated": "2025-01-01T00:00:00Z" }