Skip to main content

Description

The routes on this page are about the WhatsApp account connected to the instance: the privacy settings and the presence (online or offline). The routes apply only to the unofficial connection (device). On another instance type, the response is 422 with code: "UNSUPPORTED_FOR_INSTANCE_TYPE".

Privacy

Query the privacy

GET /{instanceId}/profile/privacy
The API reads the settings from WhatsApp at the time of the query. A setting that WhatsApp does not give is null.

Change the privacy

PATCH /{instanceId}/profile/privacy
The route changes one setting at a time and returns all the settings after the change, in the format of the query. The change applies on the phone and on the other devices of the account.
  • messages, defense, and stickers are read-only.
  • A value that the setting does not accept responds 400.
With readReceipts set to none, the account also stops seeing the read receipts of the contacts. The Mark as read route does not show the blue ticks to the sender.

Account presence

POST /{instanceId}/profile/presence
The route marks the account as online (available) or offline (unavailable) for the contacts. The API responds 204, with no body.
  • The instance goes online at each connection. After a reconnection, send unavailable again if you want the account offline.
  • When offline, the account does not receive the presence.update event of the subscribed contacts.

Other profile routes

The profile picture and the about text are in the Perfil section of the API Reference.