Chat
Favorite chat or message
Marks an entire chat or a specific message as a favorite
POST
Favorite chat or message
Auth:
TokenAccount or TokenInstance • Rate-limit: Global (100/min) • Idempotent: yes
Description
Marks a chat as favorite (by passingnumber) 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 onlynumber. Use this to highlight important contacts in the list, without tying the favorite to a specific message.
Favorite a message
Favorites a specific message viamessageId. When both fields are sent, messageId takes precedence and the favorite is recorded on the message instead of the chat.
Remove favorite
Withfavorite: 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).
Success response
Thetype 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
Path parameters
string
required
Instance name.
Headers
Request body
string
Phone number or JID. Use to favorite the entire chat.
string
Message ID. Use to favorite a specific message. Takes precedence over
number.boolean
required
true favorites, false removes the favorite.You must send at least one of
number and messageId.Error responses
Error 400
Related
Pin chat
POST /api/chat/pinChat/:instanceFind message
Retrieve a favorited message.