POST
/
api
/
v1
/
accounts
/
{account_id}
/
portals
/
{id}
/
categories
Add a new category
curl --request POST \
  --url https://app.chatwoot.com/api/v1/accounts/{account_id}/portals/{id}/categories \
  --header 'Content-Type: application/json' \
  --header 'api_access_token: <api-key>' \
  --data '{
  "name": "Category Name",
  "description": "Category description",
  "position": 1,
  "slug": "category-name",
  "locale": "en",
  "icon": "📚",
  "parent_category_id": 1,
  "associated_category_id": 2
}'
{
  "id": 123,
  "description": "<string>",
  "locale": "<string>",
  "name": "<string>",
  "slug": "<string>",
  "position": 123,
  "portal_id": 123,
  "account_id": 123,
  "associated_category_id": 123,
  "parent_category_id": 123
}

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

account_id
integer
required

The numeric ID of the account

id
string
required

The slug identifier of the portal

Body

application/json
name
string

The name of the category

Example:

"Category Name"

description
string

A description for the category

Example:

"Category description"

position
integer

Category position in the portal list to sort

Example:

1

slug
string

The category slug used in the URL

Example:

"category-name"

locale
string

The locale of the category

Example:

"en"

icon
string

The icon of the category as a string (emoji)

Example:

"📚"

parent_category_id
integer

To define parent category, e.g product documentation has multiple level features in sales category or in engineering category.

Example:

1

associated_category_id
integer

To associate similar categories to each other, e.g same category of product documentation in different languages

Example:

2

Response

Success

id
integer
description
string

The text content.

locale
string
name
string
slug
string
position
integer
portal_id
integer
account_id
integer
associated_category_id
integer

To associate similar categories to each other, e.g same category of product documentation in different languages

parent_category_id
integer

To define parent category, e.g product documentation has multiple level features in sales category or in engineering category.