> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zapperhub.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Profile and privacy

> Query and change the privacy of the account and set the presence of the account

## 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`

```json theme={null}
{
  "groupAdd": "contacts",
  "lastSeen": "contacts",
  "status": "contacts",
  "profile": "all",
  "readReceipts": "all",
  "callAdd": "all",
  "online": "match_last_seen",
  "messages": "all",
  "defense": "off",
  "stickers": "contacts"
}
```

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`

```json theme={null}
{ "setting": "lastSeen", "value": "none" }
```

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.

| `setting` | Controls | Accepted values |
| - | - | - |
| `groupAdd` | Who can add the account to groups | `all`, `contacts`, `contact_blacklist`, `none` |
| `lastSeen` | Who sees the last seen | `all`, `contacts`, `contact_blacklist`, `none` |
| `status` | Who sees the status updates | `all`, `contacts`, `contact_blacklist`, `none` |
| `profile` | Who sees the profile picture | `all`, `contacts`, `contact_blacklist`, `none` |
| `readReceipts` | Read receipts | `all` (on), `none` (off) |
| `online` | Who sees when the account is online | `all`, `match_last_seen` |
| `callAdd` | Calls from unknown numbers | `all` (ring), `known` (silenced) |

| Value | Meaning |
| - | - |
| `all` | Everyone. |
| `contacts` | Contacts only. |
| `contact_blacklist` | Contacts, except the ones excluded on the phone. |
| `none` | Nobody. |
| `match_last_seen` | The same audience as the last seen. |

* `messages`, `defense`, and `stickers` are read-only.
* A value that the setting does not accept responds `400`.

> [!NOTE]
>
> With `readReceipts` set to `none`, the account also stops seeing the read
> receipts of the contacts. The [Mark as read](https://docs.zapperhub.com/en/functions/sending-messages.md#mark-as-read)
> route does not show the blue ticks to the sender.

## Account presence

`POST /{instanceId}/profile/presence`

```json theme={null}
{ "presence": "unavailable" }
```

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`](https://docs.zapperhub.com/en/integrations/webhooks#presence-of-a-contact) event of
  the subscribed contacts.

## Other profile routes

The profile picture and the about text are in the *Perfil* section of the
[API Reference](https://docs.zapperhub.com/api-reference).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.