Assign Categories
#
Method#
/business/categoriesPOST
https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/business/categories
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
#
ConceptThrough this method, it is possible to assign categories to the company.
Important
This method is only available for Business WhatsApp accounts.
Attention
It is possible to register a maximum of 3 categories for the company, and at least one is required.
#
Attributes#
RequiredAttributes | Type | Description |
---|---|---|
categories | array string | Label of the category to be assigned |
#
Request BodyImportant
The values sent in the "categories" attribute must be identical to those returned in the "List Categories" request, under the "label" property. Only in this way is it possible to identify the desired category to be assigned.
#
Response#
201Attributes | Type | Description |
---|---|---|
success | boolean | true if successful, false in case of failure |
Example
#
405In this case, ensure that you are sending the method specification correctly, i.e., check if you sent the POST or PUT as specified at the beginning of this topic.
#
415If you receive a 415 error, make sure to add the "Content-Type" of the object you are sending in the request headers, in most cases, it should be "application/json".