Mute conversations
Learn how to mute / unmute Instagram conversations using Unipile API.
To update the mute status of a chat, use Update a Chat method and define muted_until to:
- The date until which the chat should be muted
trueto mute indefinitelyfalseto unmute
const { data, error } = await messagingApi.updateChat({
path: {
account_id: "acc_123456789",
chat_id: "chat_id",
},
body: {
muted_until: true,
},
});messaging_api.update_chat(
"chat_id",
"acc_123456789",
{"muted_until": True},
)curl --request PATCH \
--url https://api.unipile.com/v2/account_id/chats/chat_id \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"muted_until":true}'
Note on message events
message.newevents are always sent to webhooks — even for muted chats — as they are intended for message synchronization.If your application includes a notification feature that should respect a chat's mute status, check the mute status of the parent chat for each incoming message on your webhook before deciding whether to trigger a notification for your users.
Updated about 1 month ago