Skip to main content

Edit tag

Method#

/business/edit-tag/{{TAG_ID}}#

POST https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/business/edit-tag/{{TAG_ID}}

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Concept#

This method allows you to edit a tag.

Important

This method is only available for WhatsApp Business accounts.

Attributes#

Required#

AttributesTypeDescription
namestringNew tag name

Optional#

AttributesTypeDescription
colornumberKey (index) of the new desired color. This value must be set according to the available colors, which can be found in this API

Request Params#

URL example#

Method

POST https://api.z-api.io/instances/{{instanceId}}/token/{{instanceToken}}/business/edit-tag/{{TAG_ID}}

Request Body#

{
"name": "Tag Name"
}
{
"name": "Tag Name",
"color": 2
}

Response#

200#

AttributesTypeDescription
successbooleantrue if successful, false otherwise

Example

{
"success": true
}

405#

In 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.

415#

If 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".


Code#