curl --request POST \
--url https://api.wppfy.com/message/pin \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"id": "3A12345678901234567890123456789012",
"pin": true,
"duration": 7
}
'{
"id": "5511999999999:3A12345678901234567890123456789012",
"messageid": "3A12345678901234567890123456789012",
"chatid": "120363123456789012@g.us",
"sender": "5511999999999@s.whatsapp.net",
"senderName": "My Instance",
"isGroup": true,
"fromMe": true,
"content": {},
"messageType": "PinInChatMessage",
"source": "web",
"messageTimestamp": 1704067200000,
"status": "Pending",
"text": "Pinned message",
"quoted": "",
"edited": "",
"reaction": "",
"convertOptions": "",
"owner": "5511999999999",
"targetMessageID": "3EB0538DA65A59F6D8A251",
"pinned": true
}{
"error": "message pinning is not supported for newsletters"
}{
"error": "No session"
}{
"error": "Message not found"
}{
"error": "error pinning message: ..."
}Pins or unpins a message
Pins or unpins a specific message using WhatsApp’s native feature.
Use this operation to highlight an important message in an individual chat or group. The response records the action and it also appears in the configured events.
Important:
- The ID can be provided in the full format returned by the API or just as
messageid - In
1:1chats, the action is supported normally - In groups, permission depends on the group’s WhatsApp setting (
apenas adminsorqualquer membro) - In groups, the final permission depends on the group’s own settings
- Newsletters/channels are not supported by this endpoint
- If
pinis not sent, the default value istrue - When pinning a message,
durationaccepts days (1,7or30) - If
durationis not sent or has any other value, the API uses30days - When unpinning (
pin: false),durationis ignored
curl --request POST \
--url https://api.wppfy.com/message/pin \
--header 'Content-Type: application/json' \
--header 'token: <api-key>' \
--data '
{
"id": "3A12345678901234567890123456789012",
"pin": true,
"duration": 7
}
'{
"id": "5511999999999:3A12345678901234567890123456789012",
"messageid": "3A12345678901234567890123456789012",
"chatid": "120363123456789012@g.us",
"sender": "5511999999999@s.whatsapp.net",
"senderName": "My Instance",
"isGroup": true,
"fromMe": true,
"content": {},
"messageType": "PinInChatMessage",
"source": "web",
"messageTimestamp": 1704067200000,
"status": "Pending",
"text": "Pinned message",
"quoted": "",
"edited": "",
"reaction": "",
"convertOptions": "",
"owner": "5511999999999",
"targetMessageID": "3EB0538DA65A59F6D8A251",
"pinned": true
}{
"error": "message pinning is not supported for newsletters"
}{
"error": "No session"
}{
"error": "Message not found"
}{
"error": "error pinning message: ..."
}Authorizations
Body
Full ID returned by the API or just the messageid
"3A12345678901234567890123456789012"
Defines whether the message should be pinned (true) or unpinned (false)
true
Pin duration in days. Accepted values: 1, 7 or 30. Any other value falls back to 30.
7
Response
Pin/unpin message action sent successfully
Unique ID of the message generated for the pin/unpin event
"5511999999999:3A12345678901234567890123456789012"
WhatsApp message ID of the event
"3A12345678901234567890123456789012"
Chat where the action occurred
"120363123456789012@g.us"
JID of the action sender
"5511999999999@s.whatsapp.net"
Instance profile name
"My Instance"
Indicates whether the chat is a group
true
Indicates whether the action was sent by the instance itself
true
Internal payload of PinInChatMessage
Type of the returned message
"PinInChatMessage"
Estimated message source
"web"
Message timestamp in milliseconds
1704067200000
Current action status
"Pending"
Friendly text derived from the action
"Pinned message"
ID of the quoted message, when applicable
""
ID of the edited message, when applicable
""
Reaction emoji, when applicable
""
Options converted for interactive messages, when applicable
""
Instance owner
"5511999999999"
ID of the target message that was pinned or unpinned
"3EB0538DA65A59F6D8A251"
Final status requested for the target message
true
