v1

latestOpenAPI 3.0.02026-07-249301.3 MB
Messaging

Perform an action on a given chat

Perform an action like changing the read status, muting the chat, retrieving a group invite link, etc.

patch/api/v1/chats/{chat_id}

Path parameters

chat_idstring required

The id of the chat to be patched

Request body

action'setReadStatus' | 'setMuteStatus' | 'setArchiveStatus' | 'setPinnedStatus' | 'addParticipant' | 'removeParticipant' | 'setLabel' | 'getInviteLink' required

The action to perform on the chat: - setReadStatus: (WhatsApp & LinkedIn only) Set the read status of the chat. - setMuteStatus: (WhatsApp & LinkedIn only) Set the mute status of the chat. - setArchiveStatus: (WhatsApp only) Set the archive status of the chat. - setPinnedStatus: (WhatsApp only) Set the pinned status of the chat. - addParticipant: (WhatsApp & Telegram only) Add a participant to the group chat. The account owner must have the Add other members permission in the group. Provide the provider ID as value, for example 334455667788@s.whatsapp.net for WhatsApp, or a Telegram user ID, username, or phone number for Telegram. - removeParticipant: (WhatsApp & Telegram only) Remove a participant from the group chat. Provide the provider ID as value, for example 334455667788@s.whatsapp.net for WhatsApp, or a Telegram user ID, username, or phone number for Telegram. - setLabel: (WhatsApp only) Add a label to the chat. If the label does not exist, it will be created and then assigned. - getInviteLink: (WhatsApp & Telegram only) Generate or retrieve the full group invite link. The account owner must have the required invite permissions in the group.

Response

OK. Request succeeded.

object'ChatPatched' required
invite_linkstring

The full group invite link. Only returned for the getInviteLink action.