Pular para o conteúdo principal
POST
/
api
/
chat
/
pin
/
:instance
Fixar 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 ou TokenInstanceRate-limit: Global (100/min) • Idempotente: sim

Descrição

Marca um chat como fixado (pin: true) ou remove a fixação (pin: false).
O WhatsApp limita a 3 chats fixados simultaneamente. Tentar fixar um quarto retorna erro do WhatsMeow propagado para a resposta.

Exemplos

Fixar

Com pin: true, o chat é movido para o topo da lista. Lembre que o WhatsApp permite no máximo 3 chats fixados ao mesmo tempo, tentar um quarto retorna erro.
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
  }'

Desfixar

Com pin: false, remove a fixação e o chat volta a ordenar normalmente por atividade. Libera espaço no limite de 3 fixados.
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
  }'

Resposta de sucesso

A resposta confirma a operação com chat_jid (JID resolvido a partir do number) e pinned refletindo o estado final. A message muda conforme o valor de pin: "Chat pinned successfully" ou "Chat unpinned successfully".
200 OK
{
  "success": true,
  "message": "Chat pinned successfully",
  "chat_jid": "5511999999999@s.whatsapp.net",
  "pinned": true
}

Parâmetros de rota

instance
string
obrigatório
Nome da instância.

Headers

NomeObrigatórioExemploDescrição
Content-Typesimapplication/json
tokensim (ou Authorization)a1b2c3d4-...TokenAccount ou TokenInstance.

Request body

number
string
obrigatório
Telefone, JID privado (...@s.whatsapp.net ou ...@lid), JID de grupo (...@g.us) ou newsletter.
pin
boolean
obrigatório
true fixa, false desfixa.

Respostas de erro

HTTPerror.messageQuando ocorre
400Instance name is required
400Invalid request body: <...>JSON malformado.
400Number is required
401Invalid token
404Instance not found
503Instance is not connected to WhatsApp
Erro 400
{
  "success": false,
  "error": { "message": "Number is required" }
}

Relacionados

Arquivar chat

POST /api/chat/archive/:instance

Favoritar

POST /api/chat/favorite/:instance