Skip to main content

Mute Chats

Method#

/modify-chat#

POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/modify-chat

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Concept#

This method is responsible for muting and unmuting your chats.


Attributes#

Required#

AttributeTypeDescription
phoneintegerPhone number you want to mute or unmute in YOUR chat
actionstringAttribute for muting and unmuting the chat (mute or unmute)

Request Body#

Example

{
"phone": "5544999999999",
"action": "mute" or "unmute"
}

Response#

200#

AttributeTypeDescription
valuebooleanAction confirmation attribute

Example

{
"value": true
}

405#

In this case, make sure you are sending the method specification correctly, i.e., check if you sent the POST or GET 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 for the object you are sending, most commonly "application/json."


Code#