Skip to main content
POST
/
api
/
chat
/
pin
/
:instance
Pin chat
curl --request POST \
  --url https://api.example.com/api/chat/pin/:instance \
  --header 'Content-Type: application/json' \
  --data '
{
  "number": "<string>",
  "pin": true
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt

Use this file to discover all available pages before exploring further.

Auth: TokenAccount or TokenInstanceRate-limit: Global (100/min) • Idempotent: yes

Description

Marks a chat as pinned (pin: true) or removes the pin (pin: false).
WhatsApp limits to 3 pinned chats simultaneously. Trying to pin a fourth returns a WhatsMeow error propagated to the response.

Examples

Pin

With pin: true, the chat moves to the top of the list. Remember WhatsApp allows at most 3 pinned chats at the same time, trying a fourth returns an error.
curl -X POST "https://ryzeapi.cloud/api/chat/pin/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "5511999999999",
    "pin":    true
  }'

Unpin

With pin: false, removes the pin and the chat returns to normal sorting by activity. Frees a slot in the limit of 3 pinned chats.
curl -X POST "https://ryzeapi.cloud/api/chat/pin/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "5511999999999",
    "pin":    false
  }'

Success response

The response confirms the operation with chat_jid (JID resolved from number) and pinned reflecting the final state. The message changes depending on the value of pin: "Chat pinned successfully" or "Chat unpinned successfully".
200 OK
{
  "success": true,
  "message": "Chat pinned successfully",
  "chat_jid": "5511999999999@s.whatsapp.net",
  "pinned": true
}

Path parameters

instance
string
required
Instance name.

Headers

NameRequiredExampleDescription
Content-Typeyesapplication/json
tokenyes (or Authorization)a1b2c3d4-...TokenAccount or TokenInstance.

Request body

number
string
required
Phone number, private JID (...@s.whatsapp.net or ...@lid), group JID (...@g.us), or newsletter.
pin
boolean
required
true pins, false unpins.

Error responses

HTTPerror.messageWhen it happens
400Instance name is required
400Invalid request body: <...>Malformed JSON.
400Number is required
401Invalid token
404Instance not found
503Instance is not connected to WhatsApp
Error 400
{
  "success": false,
  "error": { "message": "Number is required" }
}

Archive chat

POST /api/chat/archive/:instance

Favorite

POST /api/chat/favorite/:instance