Request a WhatsApp user's phone number
Use this endpoint to send a WhatsApp interactive message that asks the recipient to share their contact information. The recipient can be addressed by phone number or by a Business-Scoped User ID (BSUID).
This endpoint sends an interactive request_contact_info message. It is intended for an active customer service conversation window; Meta may reject it if the conversation is outside that window.
Endpoint
POST /api/v1/whatsapp/request_contact_infoHeaders
apiKey
Yes
Lipachat API key.
Content-Type
Yes
application/json
Request body
messageId
string
Yes
Your unique ID for this request.
from
string
Yes
The business WhatsApp phone number registered in Lipachat.
to
string
Yes
Recipient's phone number or BSUID.
text
string
Yes
Text displayed with the contact request button.
Example request
curl --request POST 'https://<LIPACHAT_API_HOST>/api/v1/whatsapp/request_contact_info' \
--header 'apiKey: <LIPACHAT_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"messageId": "contact-request-001",
"from": "+254700000000",
"to": "KE.13491208655302741918",
"text": "Please share your phone number so we can contact you."
}'When to is a BSUID, Lipachat sends it to Meta in the recipient field. For a phone number, Lipachat uses Meta's to field.
Success response
The API returns HTTP 201 Created when the request is accepted by Meta.
SENT means Meta accepted the send request. The recipient's response arrives separately through the configured inbound message callback.
Contact-sharing callback
When the recipient shares a contact, Lipachat sends the configured client webhook a normalized message payload with type: "CONTACTS". It does not forward Meta's full object / entry / changes envelope.
Callback fields
messageId
WhatsApp message ID for the contact-sharing message.
from
Sender address. This may be a phone number or BSUID.
from_user_id
Sender's BSUID when Meta supplies it. Use this to identify the sender when a phone number is unavailable.
to
Business WhatsApp phone number that received the message.
profileName
Sender profile name; Lipachat uses the profile username as a fallback when a name is unavailable.
type
CONTACTS for a shared contact message.
contacts[].vcard
vCard content returned by Meta.
contacts[].origin
Origin value returned by Meta for the shared contact.
contacts[].phones
Phone numbers included in the shared contact, including wa_id and type when provided.
The from_user_id field is optional because Meta may omit it. The vcard, origin, and phone fields depend on what Meta includes in the incoming message.
Last updated