Skip to main content
POST
/
instances
/
{instanceId}
/
token
/
{token}
/
privacy
/
description
Profile description
curl --request POST \
  --url https://api.z-api.io/instances/{instanceId}/token/{token}/privacy/description \
  --header 'Client-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "visualizationType": "<string>"
}
'

Overview

Through this method, you can configure who can see your profile description.
The blacklist (disallowed contacts list) is different for each privacy setting.
You don’t need to resend the contactsBlacklist attribute with contacts already added. This parameter is only for blacklist changes.

Attributes

instanceId
string
required
Your instance ID. Available in the Z-API panel under Instances.
token
string
required
Your Z-API instance token.

Required

visualizationType
string
required
Visualization type: ALL (everyone), NONE (no one), CONTACTS (contacts only) or CONTACT_BLACKLIST (all contacts except blacklisted ones)

Optional

contactsBlacklist
array
List of blacklist changes (only for CONTACT_BLACKLIST type)

Request Body

Visible to everyone:
{
  "visualizationType": "ALL"
}
With blacklist:
{
  "visualizationType": "CONTACT_BLACKLIST",
  "contactsBlacklist": [
    { "action": "add", "phone": "554411111111" },
    { "action": "remove", "phone": "554422222222" }
  ]
}

Response

200

{
  "success": true
}

405

Make sure you are correctly sending the method specification, that is, verify that you sent POST or GET as specified at the beginning of this topic.

415

If you receive a 415 error, make sure to add the “Content-Type” header to your request, which in most cases is “application/json”.