Skip to content

Create a new category

Request

Security
oauth2ClientCredentials(Required scopes: categories:write)
Headers
org_wallet_refstring

Organization wallet reference, defaults to "1" if not provided

business_idstringrequired

Business identifier for the request

Bodyapplication/jsonrequired
namestringrequired

Category name

Example:"Office Expenses"
descriptionstringrequired

Category description

Example:"Office Expenses"
curl -i -X POST \
  https://developer.boyahq.com/_mock/v2/openapi/categories \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -H 'org_wallet_ref: string' \
  -d '{
    "name": "Office Expenses",
    "description": "Office Expenses"
  }'

Responses

Category created successfully

Bodyapplication/json
_idstring

Category MongoDB ID

groupidstring

Group ID

namestring

Category name

descriptionstring

Category description

subcategoriesArray of objects(SubcategoryV1Dto)

Subcategories array

statusstring

Category status

Enum:"ACTIVE""ARCHIVED"
createdAtstring

Created timestamp

updatedAtstring

Updated timestamp

__vnumber

Version key

Response
{ "_id": "string", "groupid": "string", "name": "string", "description": "string", "subcategories": [ {} ], "status": "ACTIVE", "createdAt": "string", "updatedAt": "string", "__v": 0 }