Skip to main content
POST
/
messages
/
{messageId}
/
pin
curl --request POST \
  --url https://wsapi.chat/messages/{messageId}/pin \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --header 'X-Instance-Id: <x-instance-id>' \
  --data '
{
  "chatId": "1234567890@s.whatsapp.net",
  "senderId": "1234567890@s.whatsapp.net",
  "pinned": true,
  "pinExpiration": "7d"
}
'
{
  "status": 400,
  "detail": "invalid request body"
}

Authorizations

X-Api-Key
string
header
required

Instance or customer-level API key. Either the instance's own API key or the customer's API key is accepted. Must be paired with the X-Instance-Id header to identify the target instance.

Headers

X-Instance-Id
string
default:{{instanceId}}
required

The ID of the WhatsApp instance to use

Path Parameters

messageId
string
required

Message ID

Body

application/json
chatId
string
required

Chat JID

senderId
string
required

Sender JID of the message to pin

pinned
boolean

True to pin, false to unpin

pinExpiration
string

Pin expiration duration (e.g. 24h, 7d, 30d)

Response

Message pinned/unpinned