curl --request POST \
--url https://api.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"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 403,
"detail": "device not paired"
}{
"status": 503,
"detail": "instance not available"
}Messages
Pin or unpin a message
Pin or unpin a message in a chat. Set pinned to true to pin, false to unpin. Optionally specify a pin expiration duration.
POST
/
messages
/
{messageId}
/
pin
curl --request POST \
--url https://api.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"
}{
"status": 401,
"detail": "unauthorized"
}{
"status": 403,
"detail": "device not paired"
}{
"status": 503,
"detail": "instance not available"
}Authorizations
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
The ID of the WhatsApp instance to use
Path Parameters
Message ID
Body
application/json
Response
Message pinned/unpinned
⌘I