Messages

Pin or unpin a message in a chat

Pins or unpins a message in a one-to-one or group chat. Set `messageAction` to `pin` or `unpin` and pass the `messageId` of the target message. For `pin`, `pinMessageDuration` selects how long the message stays pinned (`24_hours`, `7_days`, or `30_days`). WUTS automatically detects whether the target message was sent by this account or received from the contact/participant, so the pinned-message banner resolves correctly on the recipient's device — you can override this with the optional `fromMe` and `participant` fields. Alias: `phone` for `to`.

POST
/send/pin-message

Pins or unpins a message in a one-to-one or group chat. Set messageAction to pin or unpin and pass the messageId of the target message. For pin, pinMessageDuration selects how long the message stays pinned (24_hours, 7_days, or 30_days). WUTS automatically detects whether the target message was sent by this account or received from the contact/participant, so the pinned-message banner resolves correctly on the recipient's device — you can override this with the optional fromMe and participant fields. Alias: phone for to.

Authorization

bearerAuth
AuthorizationBearer <token>

Per-user API token (UUID v4) sent as Authorization: Bearer <token>. Identifies the tenant and user.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/send/pin-message" \  -H "Content-Type: application/json" \  -d '{    "to": "5511999999999",    "messageId": "3EB0XXXXXXXXXXXXXXXXXX",    "messageAction": "pin",    "pinMessageDuration": "7_days"  }'
{  "success": true,  "message_id": "3EB0XXXXPIN1234567890ABCD",  "timestamp": "2026-06-21T21:15:14Z",  "status": "sent",  "chat_jid": "5511999999999@s.whatsapp.net",  "message": "Message pinned successfully"}
{  "error": "pinMessageDuration is required when messageAction is pin (24_hours, 7_days or 30_days)"}
{  "error": "unauthorized"}
{  "error": "failed to dispatch message"}
{  "error": "WhatsApp device is not connected"}