Skip to content

WebhookContact

Defined in: src/types/webhooks.ts:31

A contact profile echoed alongside incoming messages and message statuses.

Meta may omit wa_id when the user has enabled WhatsApp usernames and no phone number can be shared; it is still typed string here so existing code keeps compiling, so check it at runtime. user_id (the business-scoped user ID, BSUID) is the stable identifier.

https://developers.facebook.com/documentation/business-messaging/whatsapp/business-scoped-user-ids

optional identity_key_hash?: string

Defined in: src/types/webhooks.ts:39

Identity key hash, only present when the identity change check is enabled.


optional parent_user_id?: string

Defined in: src/types/webhooks.ts:37

The contact’s parent BSUID, only present when parent BSUIDs are enabled.


optional profile?: object

Defined in: src/types/webhooks.ts:41

The contact’s profile, when provided.

optional name?: string

optional username?: string

The user’s WhatsApp username, only present when the user enabled usernames.


optional user_id?: string

Defined in: src/types/webhooks.ts:35

The contact’s business-scoped user ID (BSUID), e.g. US.13491208655302741918.


wa_id: string

Defined in: src/types/webhooks.ts:33

The WhatsApp ID (wa_id) of the contact. May be absent for username users.

Independent open-source project. Not affiliated with, endorsed by or sponsored by Meta or WhatsApp. Released under the MIT licence. Source on GitHub.