Categories APIs

Articles are categorized using categories, subcategories, and labels. The categories API enables you to manage categories and subcategories. Articles and labels are manged by other APIs.

You can create two levels of categories: the root level > categories > subcategories. A category can have subcategories, but these subcategories can not have subcategories of their own. A category can either have associated articles, or subcategories that have associated articles, but not both.
Importing Records
You can contact Wix Answers to enable administrators to import categories in bulk.

Get Category Information

Get List of Categories (User)

GET https://<tenant_subdomain>.wixanswers.com/api/v1/categories?locale={locale}

Get the list of categories for a specific language. Also see Get List of Categories (Agent).
  • Authorization: None
  • Content type: application/json; charset=utf-8.
  • Accept: application/json.
  • Response: List of Category objects.
Request Params
Description
Type
Required
locale
Category language
Two-letter country code string (for example: 'de')
Request Example:
1
GET https://wix.wixanswers.com/api/v1/categories?locale=en

Get List of Categories (Agent)

GET https://<tenant_subdomain>.wixanswers.com/api/v1/categories/admin?locale={locale}

Get the list of categories for a specific language. Unlike the user version (see Get List of Categories (User)), the included information includes extra details, such as the number of published and draft articles.
Request Params
Description
Type
Required
locale
Category language
Two-letter country code string (for example: 'de')
Request Example:
1
GET https://wix.wixanswers.com/api/v1/categories/admin?locale=en

Get Category Information Using Category ID

GET https://<tenant_subdomain>.wixanswers.com/api/v1/categories/{category GUID}?locale={locale}

Get information about a category, given the category ID.
  • Authorization: Not required
  • Content type: application/json; charset=utf-8.
  • Accept: application/json.
  • Response: Category object.
Request Params
Description
Type
Required
locale
Category language
Two-letter country code string (for example: 'de')
Request Example:
1
GET https://wix.wixanswers.com/api/v1/categories/bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa?locale=en

Get Category Information Using URI

Top-level category: GET https://<tenant_subdomain>.wixanswers.com/api/v1/categories/uri/{URI}?locale={locale}

Subcategory: GET https://<tenant_subdomain>.wixanswers.com/api/v1/categories/uri/{category URI}/{subcategory URI}?locale={locale}

Get information about a category, given the category URI and subcategory URI. A top-level category's URI is the last part of the URL when viewing the category. If you are getting a subcategory, the category and subcategory URIs are the last parts of the URL, separated by a "/",  when viewing the subcategory.
In the above picture, the category URI is getting-started-2722145.
In the above picture, the category URI is developers and the subcategory URI is overview.
  • Authorization: None
  • Content type: application/json; charset=utf-8.
  • Accept: application/json.
  • Response: Category object.
Request Params
Description
Type

locale
Category language
Two-letter country code string (for example: 'de')
Request Example (subcategory):
1
GET https://wix.wixanswers.com/api/v1/categories/uri/developers/overview?locale=en

Add Category

Add (Top-Level) Category

POST https://<tenant_subdomain>.wixanswers.com/api/v1/categories

Add a top-level category. The language used is the primary locale.
Payload Params
Description
Type
Required
name
Category name
String
position
Category sort order in the UI
Integer, 0 or higher

data
Structure of:
* iconKey (string): ID of Wix Answers stock image used to represent category
* iconSrc (string): URL of custom category image
Structure

Payload Example:
1
2
3
4
5
POST https://<tenant_subdomain>.wixanswers.com/api/v1/categories/

{
    "name":"Development"
}

Add Subcategory

POST https://<tenant_subdomain>.wixanswers.com/api/v1/categories/{category GUID}

Add a subcategory under the category specified in the URL path. You cannot add a subcategory under a subcategory.

The request params / payload are the same as the ones for adding a top-level category. The parent category is taken from the GUID in the path.

Move a Category

PUT https://<tenant_subdomain>.wixanswers.com/api/v1/categories/{category GUID}/parent

Move a category to be a child of another category, or change a subcategory to a top-level category. If a category already has associated published articles, you cannot move a subcategory to that category.
Payload Params
Description
Type
Required
parentId
The new parent.

To change the category to a top-level category, use  
00000000-0000-0000-0000-000000000000 as the parent.
Payload Example:
1
2
3
4
5
PUT https://<tenant_subdomain>.wixanswers.com/api/v1/categories/e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a/parent

{
    "parentId":"77bc8694-5ccf-436c-ab2b-543563a5f425"
}

Manage Categories

Update Category

PUT https://<tenant_subdomain>.wixanswers.com/api/v1/categories/{category GUID}

  • Authorization: Requires agent authorization level
  • Content type: application/json; charset=utf-8
  • Accept: application/json
  • Response: None
Payload Params
Description
Type
Required
name
Category name
String

locale
Category language
Two-letter country code string (for example: 'de')
position
Category sort order in the UI
Integer, 0 or higher

data
Structure of:
* iconKey (string): ID of Wix Answers stock image used to represent category
* iconSrc (string): URL of custom category image
Structure

Payload Example:
1
2
3
4
5
6
PUT https://<tenant_subdomain>.wixanswers.com/api/v1/categories/e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a

{
    "locale":"en",
    "name":"Research"
}

Get Whether a Category is Associated with Any Articles

GET https://<tenant_subdomain>.wixanswers.com/api/v1/categories/{category GUID}/isUsed

Get whether a category has any subcategories or articles. The response is true or false.
  • Authorization: Requires agent authorization level
  • Content type: application/json; charset=utf-8
  • Accept: application/json
  • Response: Boolean
Request Example:
1
GET https://wix.wixanswers.com/api/v1/categories/bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa/isUsed

Delete Category

DELETE https://<tenant_subdomain>.wixanswers.com/api/v1/categories/{category GUID}

Delete a category. You cannot delete a category if it has any associated articles or subcategories.
  • Authorization: Requires agent authorization level
  • Content type: application/json; charset=utf-8
  • Accept: application/json
  • Response: None
Request Example:
1
DELETE https://wix.wixanswers.com/api/v1/categories/bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa
Request Example Using curl:
1
curl -X DELETE https://wix.wixanswers.com/api/v1/categories/bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json; charset=utf-8' -H 'Accept: application/json'

Sort Categories

POST https://<tenant_subdomain>.wixanswers.com/api/v1/categories/sort

Sort display of categories according to the specified order.
  • Authorization: Requires agent authorization level
  • Content type: application/json; charset=utf-8
  • Accept: application/json
  • Response: None
Payload Params
Description
Type
Required
parentId
The category to sort

To sort the top-level categories, use  
00000000-0000-0000-0000-000000000000 as the parent.
ids
List of categories/subcategories in the desired sort order

If you include any ids that are not associated with the category, the operation fails. If you do not include one or more ids that are are associated with the category, the ones that you include are sorted in the specified order and appear before the other (not included) ids.
List of GUIDs
Payload Example:
1
2
3
4
5
6
POST https://<tenant_subdomain>.wixanswers.com/api/v1/categories/sort

{
    "parentId":"00000000-0000-0000-0000-000000000000",
    "ids":["bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa", "e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a"]
}

Manage Category Followers

Follow a Category

POST https://<tenant_subdomain>.wixanswers.com/api/v1/categories/{category GUID}/follow

Follow a category as an agent. You are notified when a category changes, such as when an article is added to the category.
  • Authorization: Requires agent authorization level for specific user
  • Content type: application/json; charset=utf-8
  • Accept: application/json
  • Response: None
Payload Params
Description
Type
Required
locale
Category language
Two-letter country code string (for example: 'de')
Payload Example:
1
2
3
4
5
POST https://<tenant_subdomain>.wixanswers.com/api/v1/categories/e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a/follow

{
    "locale":"en"
}

Unfollow a Category

DELETE https://<tenant_subdomain>.wixanswers.com/api/v1/categories/{category GUID}/follow?locale={locale}

Unfollow a category as an agent.
  • Authorization: Requires agent authorization level
  • Content type: application/json; charset=utf-8
  • Accept: application/json
  • Response: None
Request Params
Description
Type
Required
locale
Category language
Two-letter country code string (for example: 'de')

Get Whether You Are Following a Category

GET https://<tenant_subdomain>.wixanswers.com/api/v1/categories/{category GUID}/follow?locale={locale}

Get whether you are following a category. The response is true or false.
  • Authorization: Requires agent authorization level for specific user
  • Content type: application/json; charset=utf-8
  • Accept: application/json
  • Response: Boolean
Request Params
Description
Type
Required
locale
Category language
Two-letter country code string (for example: 'de')

Related Articles

Creating Categories and Subcategories

Help customers find the information they're looking for by organizing your articles into categories and subcategories. Tip:Planning out your categories and subcategories before you start writing articles can save you time. To learn more about creating a Help Center structure, click here.Once you have a basic outline of the categories and subcategories you need, start adding them.Important:To create categories and subcategories, you must be an administrator or have a custom role with Create, edit and delete categories and subcategories enabled in the Knowledge Base permissions. Click an option to learn more:Add a category Hover over the Knowledge Base icon in the side panel and click Categories. Click + Add New Category. Enter a category name in the field and click Create. To reorder your categories: Hover over a category, then drag and drop it into a new location using the Reorder icon . Add a subcategory Hover over the Knowledge Base icon in the side panel and click Categories. Hover over a category on the left and click the Show More icon .  Click Add Subcategory. Note: You can only add subcategories to categories that do not contain articles. Learn how to move articles to other categories.  Enter a subcategory name in the field and click Save. Note: New categories and subcategories appear in your Help Center as soon as you create them. You can hide them until they're ready to be viewed from your Help Center settings. Add a category icon Hover over the Knowledge Base icon in the side panel and click Categories. Select the category on the left. Click the category icon next to the category name at the top of the page.  Select the image type you want to add: Upload new image: Upload your own image. Select an image file from your computer and click Open. Stock Icon: Choose from hundreds of free icons. Search for icons using the search bar or the scroll menu. Click the icon you want to add and click Select. Note: Category icons do not display if you're using the Grande or La Liste template. Learn more about changing your Help Center template. 

2 min read

Finding a Category ID

A category ID (GUID) references a specific knowledge base category, including all translated versions of it. You can get category IDs from the URLs in your Wix Answers account's Categories page.To find a category ID: Hover over the Knowledge Base icon and click Categories. Select the relevant category on the left.  The category ID appears in the URL following 'categories': For example: https://[your-subdomain-name].wixanswers.com/app/kb/categories/2cbc3ca3-9e77-45ef-a4a0-c37bdd66267dNote:To find a subcategory's ID, select the subcategory in step 2 above, then locate the ID at the end of the URL after the parent category's ID (view image below). 

1 min read