API referenceWhatsapp chats
PATCH
/whatsapp/api/v1/chats/{id}

action: setReadStatus, setMuteStatus, setArchiveStatus, setPinnedStatus (value true/false), addParticipant, removeParticipant (value a JID; groups only), setLabel (value a label id), getInviteLink (groups; answers invite_link). 400 for an unknown action or a missing value.

Authorization

X-API-KEY<token>

Your API key from the console (gw_live_…).

In: header

Path Parameters

id*string

A chat id (wac_…), or a WhatsApp JID / phone number together with account_id.

Query Parameters

account_id?string

The account the id belongs to: required when the path names a JID or a phone number instead of Swarmhit's id.

Lengthlength <= 4096

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/whatsapp/api/v1/chats/wac_k3J9sLq2Vx8nB4mR?account_id=wa_Xk2pQ9rT4vW8yZ1a" \  -H "Content-Type: application/json" \  -d '{    "action": "setReadStatus",    "value": true  }'
{  "object": "ChatPatched"}