Contacts and Location Messages
See how to use the message node to send contacts or location messages and how to report and block contacts.
You can only send a location message up until 24 hours after receiving a message from the user. If you have not received a message from the user within this time, you will need to start a new conversation by sending a Template message.
Sending Location Messages
To send location messages, make a POST
call to the /messages
endpoint and attach a message
object with type=location
. Then, add a location object.
POST
https://waba-v2.360dialog.io/messages
Request Body
Name | Type | Description |
---|---|---|
to* | string | Recipient wa_id |
type* | string | Message type: |
location* | object | See Location Object. |
messaging_product* | string | Required only for Cloud API.
Messaging service used for the request. Use |
Location Object
Name | Description |
---|---|
| Required. Longitude of the location. |
| Required. Latitude of the location. |
| Required. Name of the location. |
| Required. Address of the location. |
The location message will look like this to the end user:
[will be deprecated] If the WABA is registered in On-premise API
As announced in November 2023, Meta is transitioning to a fully Cloud-hosted WhatsApp Business Platform and will stop supporting On-Premise API in October 2025. Starting from On-Premise client v2.53, all new feature updates will be exclusively delivered to Cloud API. While the On-Premise API client will receive quarterly releases, they will focus solely on bug fixes and security patches.
POST
https://waba.360dialog.io/v1/messages
Request Body
Name | Type | Description |
---|---|---|
type* | string | Message type: |
to* | string | Recipient wa_id |
location* | object | See Location Object. |
Sending Contacts Messages
To send contact messages, make a POST
call to the /messages
endpoint and attach a message
object with type=contacts
. Then, add a contacts object.
POST
https://waba-v2.360dialog.io/messages
Request Body
Name | Type | Description |
---|---|---|
to* | string | Recipient wa_id |
type* | string | Message type: |
messaging_product* | string | Required for Cloud API.
Use |
contacts* | object | See Contacts Object. |
Contacts Object
Inside contacts
, you can nest the following objects: addresses
, emails
, name
, org
, phone
, and urls
. Pluralized objects are to be wrapped in an array as shown in the example below.
Name | Description |
---|---|
object | Optional. Full contact address(es) formatted as an The object can contain the following fields:
|
| Optional.
|
object | Optional. Contact email address(es) formatted as an The object can contain the following fields:
|
object | Required. Full contact name formatted as a The object can contain the following fields:
*At least one of the optional parameters needs to be included along with the |
object | Optional. Contact organization information formatted as an The object can contain the following fields:
|
object | Optional. Contact phone number(s) formatted as a The object can contain the following fields:
|
object | Optional. Contact URL(s) formatted as a The object can contain the following fields:
|
Example of a contacts
object with pluralized objects nested inside:
The contact message will look like this to the end user:
[will be deprecated] If the WABA is registered in On-premise API
As announced in November 2023, Meta is transitioning to a fully Cloud-hosted WhatsApp Business Platform and will stop supporting On-Premise API in October 2025. Starting from On-Premise client v2.53, all new feature updates will be exclusively delivered to Cloud API. While the On-Premise API client will receive quarterly releases, they will focus solely on bug fixes and security patches.
POST
https://waba.360dialog.io/v1/messages
Request Body
Name | Type | Description |
---|---|---|
type* | string | Message type: |
to* | string | Recipient wa_id |
contacts* | object | See Contacts Object. |
How to block contacts
Currently, it is not possible to block or unblock contacts in the Cloud API. Please refer to Meta Support regarding this limitation.
If you block a number in On-premise and then migrate to Cloud API, the number will remain blocked without the option to unblock it.
[will be deprecated] If the WABA is registered in On-premise API
As announced in November 2023, Meta is transitioning to a fully Cloud-hosted WhatsApp Business Platform and will stop supporting On-Premise API in October 2025. Starting from On-Premise client v2.53, all new feature updates will be exclusively delivered to Cloud API. While the On-Premise API client will receive quarterly releases, they will focus solely on bug fixes and security patches.
To block a contact, you must have received a message from them within the last 24 hours.
Submit an API call to /v1/contacts/{phone_number}/block
with a reason for blocking another business account.
When successful, the response will have HTTP status 200
and will come without the "errors" object. The failed response looks like this:
blocking parameters
blocking parameters
The following parameters are supported by POST calls to /v1/contacts/{phone_number}/block
:
Settings | Description |
---|---|
| Optional. Blocking reason in free text format. It will be used during the process of blocking another business account. Must be less than 60 characters. |
| Mandatory. Numbers can be in any phone number format. The recommended format for contact phone numbers includes a plus sign (+) and country code. |
How to unblock contacts
To unblock a contact, send an API call to/v1/contacts/{phone_number}/unblock
When successful, the response will have HTTP status 200
and will come without the "errors" object.
The failed response looks like this:
unblock parameters
unblock parameters
The following parameters are supported by POST calls to /v1/contacts/{phone_number}/unblock
:
Settings | Description |
---|---|
| Mandatory. Numbers can be in any phone number format. The recommended format for contact phone numbers includes a plus sign (+) and country code. |
How to get a Block List
Here's how to get a list of your blocked contacts.
Send an API call to /v1/contacts/blocklist
to receive a paginated list of your blocked contacts.
You will receive a response with a page from your block list and paging information.
block list parameters
block list parameters
The following parameters are supported for GET calls to /v1/contacts/blocklist
:
Settings | Description |
---|---|
| Optional. Accepted range is (0;200]. Default: 100. |
| Optional. Default: 0. |
How to Report a Contact
To report a contact, you must have received a message from them within the last 24 hours.
Send an API call to /v1/contacts/{phone_number}/report
including a reason if you are blocking another business account.
When successful, the response will have HTTP status 200
and will come without the "errors" object.
The failed response looks like this:
reporting parameters
reporting parameters
The following parameters are supported by POST calls to /v1/contacts/{phone_number}/report
:
Settings | Description |
---|---|
| Optional. Blocking reason in free text format. It will be used during the process of blocking another business account. Must be less than 60 characters. |
| Optional. The default is If you just want to report or also block the contact. |
| Optional. The ID of the message to be reported. If not specified, the last 5 messages will be sent to WhatsApp. |
| Mandatory. Numbers can be in any phone number format. The recommended format for contact phone numbers includes a plus sign (+) and country code. |
Last updated