Skip to main content
POST
/
instances
/
{instanceId}
/
token
/
{token}
/
modify-chat
Pin chats
curl --request POST \
  --url https://api.z-api.io/instances/{instanceId}/token/{token}/modify-chat \
  --header 'Client-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone": "<string>",
  "action": "<string>"
}
'

Overview

This method is responsible for pinning and unpinning your chats.

Attributes

instanceId
string
required
Your instance ID. Available in the Z-API panel under Instances.
token
string
required
Your Z-API instance token.

Required

phone
string
required
Phone number of the chat you want to modify
action
string
required
Action: pin or unpin

Request Body

{
  "phone": "5544999999999",
  "action": "pin"
}

Response

200

{
  "value": true
}

405

In this case, make sure you are correctly sending the method specification, i.e., check if you sent 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” of the object you are sending in the request headers, most commonly “application/json”.