Pin or unpin a message in a WhatsApp group

Pins or unpins one message in a WhatsApp group. Members see the change in WhatsApp.

Before you call

  • Pass the group's groupId and the messageId of a message in the group, from Get WhatsApp group chat messages.
  • To pin, send action: pin with expirationDays (1 to 30). To unpin, send action: unpin without expirationDays.
  • The API key's user needs permission to modify WhatsApp groups on the group's number.
  • The WhatsApp number must be an admin of the group, and the group must have finished creating on WhatsApp.

How it works

  • Pins or unpins one message per request on WhatsApp, then records it and returns the message's pin state.
  • A pin ends on its own after expirationDays.
  • A group keeps at most 3 pinned messages: pinning another one unpins the oldest pinned message, listed in autoUnpinnedMessageIds.
  • Only one pin or unpin can run per group at a time: an overlapping request gets a 409, so retry it after a moment.
  • Returns 400 if the message has not reached WhatsApp yet, or if WhatsApp refuses the request.

Rate limit

  • 30 requests per minute.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

Unique identifier of the group

uuid
required

messageId of a message in the group, as returned by GET /whatsapp/wa-group/chat-messages

string
enum
required
Allowed:
integer
1 to 30

How many days the message stays pinned. Required when action is pin, not allowed when action is unpin.

Responses

400

Invalid fields, the message has not reached WhatsApp yet, or WhatsApp refused the request

401

Invalid API key, or the API key's user may not modify WhatsApp groups on this number

403

Group not found or deleted

404

Message not found in the group, or group creation is still pending

409

Another pin or unpin in this group is in progress

422

The group's number is not usable for this operation (coexistence or disconnected number)

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json