Passer au contenu principal
PUT
/
whatsapp
/
status
/
privacy
Définir confidentialité statuts
curl --request PUT \
  --url https://api.wachap.com/v1/whatsapp/status/privacy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "accountId": "<string>",
  "privacyType": "all"
}
'

Définir la confidentialité des statuts

Modifiez le mode de confidentialité pour vos statuts WhatsApp.

Endpoint

/v1/whatsapp/status/privacy

Headers

Authorization
string
requis
Bearer token avec votre Secret Key (format: Bearer sk_...)

Body Parameters

accountId
string
requis
L’identifiant du compte WhatsApp
privacyType
string
requis
Mode de confidentialité: all, contacts, contacts_except, none

Exemples de requêtes

curl -X PUT https://api.wachap.com/v1/whatsapp/status/privacy \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer VOTRE_CLE_SECRETE" \
  -d '{
    "accountId": "account_xxx",
    "privacyType": "contacts"
  }'

Exemple de réponse

{
  "success": true,
  "message": "Confidentialité des statuts mise à jour",
  "newPrivacyMode": "contacts"
}

Codes d’erreur

CodeDescription
400INVADLID_PRIVACY_TYPE - Type invalide
401INVALID_SECRET_KEY - Clé secrète invalide
404ACCOUNT_NOT_FOUND - Compte WhatsApp non trouvé

Autorisations

Authorization
string
header
requis

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Corps

application/json
accountId
string
privacyType
enum<string>
Options disponibles:
all,
contacts,
contacts_except,
none

Réponse

200

OK