Question
How can I delete a WhatsApp number from the user's profile? From the context panel of your ticket, the phone number shows after the WhatsApp field:
Answer
From the UI, you cannot remove WhatsApp numbers like other phone numbers. WhatsApp users are identified after contacting Zendesk for the first time and WhatsApp phone numbers are stored as an identity in the back-end. From the end user profile, no phone number will appear, however the WhatsApp number is linked to that user.
To remove that number, developers can make use of the API and the User Identities endpoint.
- Locate the
user_id
from your browser after opening the profile from the user you want to edit. It is the long number in the URL :
- Follow this end point and build the path below. Replace
yousubdomain
with your actual subdomain anduser_id
with the value you found:https://yoursubdomain.zendesk.com/api/v2/users/user_id/identities
The existing identities for that user will appear:
-
Delete the
messaging
type using Postman, or any other tool, with a delete request using this path, gather theid
to replaceentity_id
from the previous step, and replaceyousubdomain
with your subdomain:https://yoursubdomain.com/api/v2/users/{user_id}/identities/entity_id.json
-
After running the API call, you will see this on Postman:
Once you delete that identity, the user profile will no longer show the number:
For more information, see these articles: