Skip to main content

Report Contact

Method#

/contacts/{{phone}}/report#

POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/contacts/{{phone}}/report

Header#

KeyValue
Client-TokenACCOUNT SECURITY TOKEN

Concept#

This method is responsible for reporting a contact.


Attributes#

Required#

AttributeTypeDescription
phonestringPhone number you want to report

Request Params#

Example URL#

Method

POST https://api.z-api.io/instances/YOUR_INSTANCE/token/YOUR_TOKEN/contacts/5544999999999/report


Response#

200#

AttributeTypeDescription
successbooleanAction confirmation attribute (true, false)
errorstringError message, if any

Example

{
"success": true
}

400#

{
"error": "Invalid phone"
}

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#