Creates a category.

Endpoint URL

https://{{base_url}}/api/v2/category

Authentication and rate limits

ItemDetails
Authentication methodOAuth 2.0 Bearer token
Rate limitRate Limit

Requests Example

curl --request POST \
  --url 'https://{{base_url}}/api/v2/category \
  --header 'Authorization: Bearer $BEARER_TOKEN' \
  --header 'Content-Type: application/json' \
  --data-raw '$JSON'

Request Syntax

{
  "company": integer,
  "category": "string",
  "subcategories": ["string",...]
}

Body Parameters

  • company (integer) --

    [REQUIRED]
    The ID of the specific company your API is calling. For accounts with only one company, the default value is 1.
    To lookup a specific company ID, see the List Company API.

  • category (string) --

    [REQUIRED]
    The name of the category.
    Max characters = 50
    The name of the category must be unique per account.

  • subcategories (list of strings) --

    The list of subcategory names.
    Max characters = 50 per subcategory
    The name of each subcategory must be unique per category.

Response Syntax

{
  "id": integer,
  "category": "string",
  "subcategories": ["string",...]
}