Skip to main content
POST
/
api
/
chat
/
favorite
/
:instance
Favorite chat or message
curl --request POST \
  --url https://api.example.com/api/chat/favorite/:instance \
  --header 'Content-Type: application/json' \
  --data '
{
  "number": "<string>",
  "messageId": "<string>",
  "favorite": 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 favorite (by passing number) or a specific message (by passing messageId). At least one of the two must be present.
When both are provided, messageId takes precedence, the favorite is recorded on the message.

Examples

Favorite a chat

Marks the entire conversation as a favorite by passing only number. Use this to highlight important contacts in the list, without tying the favorite to a specific message.
curl -X POST "https://ryzeapi.cloud/api/chat/favorite/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "number":   "5511999999999",
    "favorite": true
  }'

Favorite a message

Favorites a specific message via messageId. When both fields are sent, messageId takes precedence and the favorite is recorded on the message instead of the chat.
curl -X POST "https://ryzeapi.cloud/api/chat/favorite/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "messageId": "3EB08FCF27E532F1B0F5",
    "favorite":  true
  }'

Remove favorite

With favorite: false, undoes the previously recorded favorite on the chat or the message (depending on which field was provided, same precedence rule as in the previous examples).
curl -X POST "https://ryzeapi.cloud/api/chat/favorite/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "messageId": "3EB08FCF27E532F1B0F5",
    "favorite":  false
  }'

Success response

The type field indicates what was marked: "chat" when you favorited the entire conversation, or "message" when you passed a messageId (in that case message_id is filled in). chat_jid is always returned. favorite reflects the final state.
200 OK
{
  "success": true,
  "message": "Message favorited successfully",
  "chat_jid": "5511999999999@s.whatsapp.net",
  "message_id": "3EB08FCF27E532F1B0F5",
  "favorite": true,
  "type": "message"
}

Path parameters

instance
string
required
Instance name.

Headers

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

Request body

number
string
Phone number or JID. Use to favorite the entire chat.
messageId
string
Message ID. Use to favorite a specific message. Takes precedence over number.
favorite
boolean
required
true favorites, false removes the favorite.
You must send at least one of number and messageId.

Error responses

HTTPerror.messageWhen it happens
400Instance name is required
400Invalid request body: <...>Malformed JSON.
400Either number or messageId is requiredNeither provided.
401Invalid token
404Instance not found
404Message not foundmessageId does not exist.
503Instance is not connected to WhatsApp
Error 400
{
  "success": false,
  "error": { "message": "Either number or messageId is required" }
}

Pin chat

POST /api/chat/pin/:instance

Find message

Retrieve a favorited message.