We are sunsetting On-Premises API. Refer to our On-Premises API Sunset document for details, and to learn how to migrate to our next-generation Cloud API.

User WhatsApp ID Identity

/v1/contacts/{users-whatsapp-id}/identity

It is possible to receive notifications from WhatsApp when a user you are communicating with has potentially changed. Use this /v1/contacts edge to manage users' identities. See Understanding Identity Change for WhatsApp Business for more information.

For more information about the system notification sent from WhatsApp see Inbound System Messages — Example: A User Potentially Changed. The response to the system notification is managed by your business.

Reading

A GET call to this endpoint retrieves the latest identity hash for a user.

Example

Request:

GET /v1/contacts/users-whatsapp-id/identity

If successful, your request returns 200 OK and a message body containing a contacts object. For example, the complete response, including the contacts object, might look like this:

{
    "contacts":
    {
        "hash": "UKD6Y/5SqDU=",
        "created_timestamp": 1600132094000,
        "acknowledged": true 
    }
}
  

Returned Fields

The contacts response object contains the following information about the user’s identity.

NameDescription

acknowledged

type: String

State of acknowledgment for latest user_identity_changed system notification.

created_timestamp

type: Int

Timestamp of when the WhatsApp Business API client detected the user potentially changed.

hash

type: String

Identifier for the latest user_identity_changed system notification.

Creating

Use PUT calls to this endpoint to acknowledge the latest user_identity_changed system notification.

Until you make a successful identity API call after receiving a user_identity_changed notification, all outgoing messages to this user will be blocked if the show_security_notifications settings is enabled in the application settings.

Example

Request:

PUT /v1/contacts/users-whatsapp-id/identity
  {
    “hash”: “Rc/eg9RQ0JA=”
  }

A successful response is 200 OK with a null or {} message body.

Parameters

NameDescription

hash

type: String

Identifier of the latest user_identity_change system notification received for this contact