Assign Categories
#
Method#
/business/categoriesPOST
https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/business/categories
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
ConceptThis method allows you to assign categories to a business/company.
Important
This method is only available for WhatsApp Business accounts.
Warning
You can register up to 3 categories for the business, and at least one is required.
#
Attributes#
MandatoryAttributes | Type | Description |
---|---|---|
categories | array string | ID or label of the category to be assigned. Can be obtained from the List Categories API |
#
Request BodyImportant
The values sent in the "categories" attribute must be identical to those returned in the "List Categories" request, in the "id" or "label" property. The "id" property is useful when the "label" is not returned. Only this way can the desired category be identified for assignment.
#
Response#
201Attributes | Type | Description |
---|---|---|
success | boolean | true if successful, false otherwise |
Example
#
405In this case, make sure you are correctly sending the method specification, i.e., check if you sent POST or PUT as specified at the beginning of this topic.
#
415If you receive a 415 error, make sure to add the "Content-Type" header to the request object you are sending, which in most cases is "application/json".