header, body, footer, and action. Inside the action component business specifies the name “address_message” and relevant parameters.| Field Name | Display Label | Input Type | Supported Countries | Limitations |
|---|---|---|---|---|
name | Name | text | India | None |
phone_number | Phone Number | tel | India | Valid phone numbers only |
in_pin_code | Pin Code | text | India | Max length: 6 |
house_number | Flat/House Number | text | India | None |
floor_number | Floor Number | text | India | None |
tower_number | Tower Number | text | India | None |
building_name | Building/Apartment Name | text | India | None |
address | Address | text | India | None |
landmark_area | Landmark/Area | text | India | None |
city | City | text | India | None |
state | State | text | India | None |
country attribute is a mandatory field in the action parameters. If it is not included, there will be a validation error.curl -X POST \ 'https://graph.facebook.com/<API_VERSION>/<FROM_PHONE_NUMBER_ID>/messages' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Content-Type: application/json' \ -d ' { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "<PHONE_NUMBER>", "type": "interactive", "interactive": { "type": "address_message", "body": { "text": "Thanks for your order! Tell us what address you’d like this order delivered to." }, "action": { "name": "address_message", "parameters": { "country": "<COUNTRY_ISO_CODE>" } } } }'
address_message to the user




values, validation_errors, or saved_addresses as part of the interactive action parameters. You can find information on each of their usage below.| Action Parameter | Usage |
|---|---|
values | Businesses prefill this for address fields (eg. prefilling the city address field with “India”) |
saved_addresses | For businesses, they can pass in saved addresses previously associated with the user. For users, they are presented with the option to choose the saved address instead of manually filling it in |
validation_errors | Businesses can throw errors in the address fields and WhatsApp will prevent the user from submitting the address until the issue(s) are/is resolved. |
POST call to /<PHONE_NUMBER_ID/messages using the WhatsApp API to send an end-to-end encrypted address message to the user:curl -X POST \ 'https://graph.facebook.com/<API_VERSION>/<FROM_PHONE_NUMBER_ID>/messages' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Content-Type: application/json' \ -d ' { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "<PHONE_NUMBER>", "type": "interactive", "interactive": { "type": "address_message", "body": { "text": "Thanks for your order! Tell us what address you’d like this order delivered to." }, "action": { "name": "address_message", "parameters": "JSON Payload" } } }'
curl -X POST \ 'https://graph.facebook.com/<API_VERSION>/<FROM_PHONE_NUMBER_ID>/messages' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Content-Type: application/json' \ -d ' { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "+91xxxxxxxxxx", "type": "interactive", "interactive": { "type": "address_message", "body": { "text": "Thanks for your order! Tell us what address you’d like this order delivered to." }, "action": { "name": "address_message", "parameters": { "country": "IN", "values": { "name": "<CUSTOMER_NAME>", "phone_number": "+91xxxxxxxxxx" } } } } }'
curl -X POST \ 'https://graph.facebook.com/<API_VERSION>/<FROM_PHONE_NUMBER_ID>/messages' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Content-Type: application/json' \ -d ' { "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "interactive", "interactive": { "type": "address_message", "body": { "text": "Thanks for your order! Tell us what address you’d like this order delivered to." }, "action": { "name": "address_message", "parameters": { "country": "IN", "saved_addresses": [ { "id": "address1", "value": { "name": "<CUSTOMER_NAME>", "phone_number": "+91xxxxxxxxxx", "in_pin_code": "400063", "floor_number": "8", "building_name": "", "address": "Wing A, Cello Triumph,IB Patel Rd", "landmark_area": "Goregaon", "city": "Mumbai" } } ] } } } }'
messages object with an ID for the newly created message.{ "messaging_product": "whatsapp", "contacts": [ { "input": "<PHONE_NUMBER>", "wa_id": "<WHATSAPP_ID>" } ], "messages": [ { "id": "wamid.ID" } ] }
curl -X POST \ 'https://graph.facebook.com/<API_VERSION>/<FROM_PHONE_NUMBER_ID>/messages' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -H 'Content-Type: application/json' \ -d '{ "messaging_product": "whatsapp", "recipient_type": "individual", "to": "91xxxxxxxxxx", "type": "interactive", "interactive": { "type": "address_message", "body": { "text": "Thanks for your order! Tell us what address you’d like this order delivered to." }, "action": { "name": "address_message", "parameters": { "country": "IN", "values": { "name": "CUSTOMER_NAME", "phone_number": "+91xxxxxxxxxx", "in_pin_code": "666666", "address": "Some other location", "city": "Delhi" }, "validation_errors": { "in_pin_code": "We could not locate this pin code." } } } } }'
{ "messages": [ { "id": "gBGGFlAwCWFvAgmrzrKijase8yA", "from": "<PHONE_NUMBER>", "interactive": { "type": "interactive", "action": "address_message", "nfm_reply": { "name": "address_message", "response_json": "<response_json from client>", "body": "<body text from client>" }, "timestamp": "1670394125" } } ] }
| Field Name | Type | Description |
|---|---|---|
interactive | Object | Holds the response from the client |
type | String | Would be nfm_reply indicating it is a Native Flow Response (NFM) from the client |
nfm_reply | Object | Holds the data received from the client |
response_json | String | The values of the address fields filled by the user in JSON format that are always present |
body (Optional) | String | Body text from client, what the user sees |
name (Optional) | String | Would be address_message indicating the type of NFM action response from the client |
{ "messages": [ { "context": { "from": "FROM_PHONE_NUMBER_ID", "id": "wamid.HBgLMTIwNjU1NTAxMDcVAgARGBI3NjNFN0U5QzMzNDlCQjY0M0QA" }, "from": "<PHONE_NUMBER>", "id": "wamid.HBgLMTIwNjU1NTAxMDcVAgASGCA5RDhBNENEMEQ3RENEOEEzMEI0RUExRDczN0I1NThFQwA=", "timestamp": "1671498855", "type": "interactive", "interactive": { "type": "nfm_reply", "nfm_reply": { "response_json": "{\"saved_address_id\":\"address1\",\"values\":{\"in_pin_code\":\"400063\",\"building_name\":\"\",\"landmark_area\":\"Goregaon\",\"address\":\"Wing A, Cello Triumph, IB Patel Rd\",\"city\":\"Mumbai\",\"name\":\"CUSTOMER_NAME\",\"phone_number\":\"+91xxxxxxxxxx\",\"floor_number\":\"8\"}}", "body": "CUSTOMER_NAME\n +91xxxxxxxxxx\n 400063, Goregaon, Wing A, Cello Triumph,IB Patel Rd, Mumbai, 8", "name": "address_message" } } } ] }
address_message, messages are silently dropped and an error message is sent back to the business in a webhook. The webhook notification that would be sent back is shown below:{ "statuses": [ { "errors": [ { "code": 1026, "href": "/docs/whatsapp/api/errors", "title": "Receiver Incapable" } ], "id": "gBGGFlAwCWFvAgkyHMGKnRu4JeA", "message": { "recipient_id": "+91xxxxxxxxxx" }, "recipient_id": "91xxxxxxxxxx", "status": "failed", "timestamp": "1670394125", "type": "message" } ] }