Client Documentation
Get StartedStatus Page
  • 360Dialog
    • Why you should use 360dialog as Business Solution Provider (BSP)
    • Prices, plans and payment options
  • client hub
    • 360Dialog Client Hub
    • Numbers
      • Manage your WABA
        • Account Statuses
    • Activity
    • Funds
      • Month Closing Invoice (MCI)
    • Payment Management
    • API Keys
    • Template Message Management
    • Partner Change
    • Cancellation
    • Downgrade
  • WhatsApp Marketing
    • Best practices to maintain Account Health and prevent being blocked
    • Driving users to your WhatsApp account
      • WhatsApp Channels
    • Business Search
    • Linking a WABA to a Facebook Page /EN
      • Vinculando uma conta WABA à uma página do Facebook /PT
      • Cómo vincular un WABA a una página de Facebook /ES
    • Linking a WABA to Google Message Ads
    • Ads that Click to WhatsApp (CTWA) /EN
      • Anúncios de Clique para o WhatsApp (CTWA) /PT
        • Como usar o WhatsApp para marketing e vendas? /PT
      • Anuncios que Click to WhatsApp (CTWA) /ES
        • ¿Cómo usar WhatsApp para marketing y ventas? /ES
    • Conversions API (CAPI)
    • Create Ads lookalike audience based on WhatsApp events
    • MM Lite API Beta
      • Onboarding
      • Sending Messages
  • waba basics
    • WhatsApp Business Platform
    • WhatsApp Accounts structure
    • WABA for Government Agencies
    • WABA Policy Enforcement
    • Architecture and Security
    • The Basics (Overview)
    • Webhook Events and Notifications
    • Messaging API
      • Messaging Health Status
      • Step to Step to move to Cloud API
        • [will be deprecated] WABA Integration (On-Premise)
    • Migrating Phone Numbers
      • Migrate number from Meta or alternate BSP to 360dialog Cloud API
      • Migrate a phone number to a new WABA
      • Migrate to alternate BSP
  • waba management
    • Creating new WABA
      • Using a new phone number
      • WhatsApp Coexistence
        • Coexistence Onboarding
        • Coexistence Webhooks
    • Display Name Guidelines
    • Meta Business Verification
    • Official Business Account (OBA) or blue badge
    • WABA Profile Info
    • Capacity, Quality Rating, and Messaging Limits
      • Accelerated Onboarding
    • Hosting type Change
  • waba Messaging
    • Sandbox (Test API Key)
    • Receiving messages
    • Before sending a message
      • Checklist for Message Broadcasts and Campaigns
    • Conversations
    • Messaging
    • Conversational Components
    • Media Messages
      • Upload, retrieve or delete media
    • Template Messages
      • Template Elements
      • Sending Template Messages
      • Authentication Templates
        • Zero-Tap Authentication Templates
        • One-Tap Autofill Authentication Templates
        • Copy Code Authentication Templates
      • Catalog Templates
      • Product Card Carousel Templates
      • Single-Product Message Templates
      • Coupon Code Templates
      • Limited-Time Offer Templates
      • Multi-Product Templates
    • Interactive Messages
      • Single and Multi Product Messages
      • Location Request Message
    • Flows
    • Products & Catalogs
    • Contacts and Location Messages
    • Payments (India Only)
      • Receive WhatsApp Payments via Payments Gateway
      • Receive WhatsApp Payments via Payment Links
      • Order Details Template Message
    • Payments (Singapore only)
      • Receive WhatsApp Payments via Stripe
  • Partners
    • Partner Documentation
  • Support
    • Help and Support
      • Opening Hours & Response Time
      • Status Pages
      • Meta Support
      • Common Issues
    • Error Messages
    • Imprint & Data Privacy
    • FAQ
Powered by GitBook
On this page
  • Sending Location Messages
  • [will be deprecated] If the WABA is registered in On-premise API
  • Sending Contacts Messages
  • [will be deprecated] If the WABA is registered in On-premise API
  • How to block contacts
  • Cloud API: Block Users
  • [will be deprecated] On-premise API: Block Users
  • How to block contacts
  • How to unblock contacts
  • How to get a Block List
  • How to Report a Contact

Was this helpful?

  1. waba Messaging

Contacts and Location Messages

Use the message node to send contacts or location messages.

PreviousProducts & CatalogsNextPayments (India Only)

Last updated 3 months ago

Was this helpful?

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 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

POST https://waba-v2.360dialog.io/messages

Request Body

Name
Type
Description

to*

string

Recipient wa_id

type*

string

Message type: location

location*

object

messaging_product*

string

Required only for Cloud API. Messaging service used for the request. Use "whatsapp".

A successful response includes an object with an identifier prefixed with wamid. Use the ID listed after wamid to track your message status.

{
  "messaging_product": "whatsapp",
  "contacts": [{
      "input": "PHONE_NUMBER",
      "wa_id": "WHATSAPP_ID",
    }]
  "messages": [{
      "id": "wamid.ID",
    }]
}
POST https://waba-v2.360dialog.io/messages' \
 
 {
  "messaging_product": "whatsapp",
  "to": "PHONE_NUMBER",
  "type": "location",
  "location": {
    "longitude": LONG_NUMBER,
    "latitude": LAT_NUMBER,
    "name": LOCATION_NAME,
    "address": LOCATION_ADDRESS
  }
}'

Location Object

Name
Description

longitude

Required.

Longitude of the location.

latitude

Required.

Latitude of the location.

name

Required.

Name of the location.

address

Required.

Address of the location.

[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. From May 15, 2024, 360dialog will not allow for new numbers to be onboarded with On-Premise API. We will continue supporting already registered On-Premise API throughout 2024, but we strongly recommend to start changing the hosting type of numbers to Cloud as soon as possible. Learn here how to integrate with Cloud API.

POST https://waba.360dialog.io/v1/messages

Request Body

Name
Type
Description

type*

string

Message type: location

to*

string

Recipient wa_id

location*

object

For On-premise API, a successful response looks like this:

{
    "messages": [{
       "id": "message-id"
    }]
}
{
    "to": "recipient-wa-id",
    "type": "location",
    "location": {
        "longitude": -122.425332,
        "latitude": 37.758056,
        "name": "Facebook HQ",
        "address": "1 Hacker Way, Menlo Park, CA 94025"
    }
}

Sending Contacts Messages

POST https://waba-v2.360dialog.io/messages

Request Body

Name
Type
Description

to*

string

Recipient wa_id

type*

string

Message type: contacts

messaging_product*

string

Required for Cloud API. Use "whatsapp".

contacts*

object

{
  "messaging_product": "whatsapp",
  "contacts": [{
      "input": "PHONE_NUMBER",
      "wa_id": "WHATSAPP_ID",
    }]
  "messages": [{
      "id": "wamid.ID",
    }]
}
POST https://waba-v2.360dialog.io/messages' \

 {
  "messaging_product": "whatsapp",
  "to": "PHONE_NUMBER",
  "type": "contacts",
  "contacts": [{
      "addresses": [{
          "street": "STREET",
          "city": "CITY",
          "state": "STATE",
          "zip": "ZIP",
          "country": "COUNTRY",
          "country_code": "COUNTRY_CODE",
          "type": "HOME"
        },
        {
          "street": "STREET",
          "city": "CITY",
          "state": "STATE",
          "zip": "ZIP",
          "country": "COUNTRY",
          "country_code": "COUNTRY_CODE",
          "type": "WORK"
        }],
      "birthday": "YEAR_MONTH_DAY",
      "emails": [{
          "email": "EMAIL",
          "type": "WORK"
        },
        {
          "email": "EMAIL",
          "type": "HOME"
        }],
      "name": {
        "formatted_name": "NAME",
        "first_name": "FIRST_NAME",
        "last_name": "LAST_NAME",
        "middle_name": "MIDDLE_NAME",
        "suffix": "SUFFIX",
        "prefix": "PREFIX"
      },
      "org": {
        "company": "COMPANY",
        "department": "DEPARTMENT",
        "title": "TITLE"
      },
      "phones": [{
          "phone": "PHONE_NUMBER",
          "type": "HOME"
        },
        {
          "phone": "PHONE_NUMBER",
          "type": "WORK",
          "wa_id": "PHONE_OR_WA_ID"
        }],
      "urls": [{
          "url": "URL",
          "type": "WORK"
        },
        {
          "url": "URL",
          "type": "HOME"
        }]
    }]
}

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

addresses

object

Optional.

Full contact address(es) formatted as an addresses object.

The object can contain the following fields:

streetstring – Optional. Street number and name.

citystring – Optional. City name.

statestring – Optional. State abbreviation.

zipstring – Optional. ZIP code.

countrystring – Optional. Full country name.

country_codestring – Optional. Two-letter country abbreviation.

typestring – Optional. Standard values are HOME and WORK.

birthday

Optional.

YYYY-MM-DD formatted string.

emails

object

Optional.

Contact email address(es) formatted as an emails object.

The object can contain the following fields:

emailstring – Optional. Email address.

typestring – Optional. Standard values are HOME and WORK.

name

object

Required.

Full contact name formatted as a name object.

The object can contain the following fields:

formatted_namestring – Required. Full name, as it normally appears.

first_namestring – Optional*. First name.

last_namestring – Optional*. Last name.

middle_namestring – Optional*. Middle name.

suffixstring – Optional*. Name suffix.

prefixstring – Optional*. Name prefix.

*At least one of the optional parameters needs to be included along with the formatted_name parameter.

org

object

Optional.

Contact organization information formatted as an org object.

The object can contain the following fields:

companystring – Optional. Name of the contact's company.

departmentstring – Optional. Name of the contact's department.

titlestring – Optional. Contact's business title.

phones

object

Optional.

Contact phone number(s) formatted as a phone object.

The object can contain the following fields:

phonestring – Optional. Automatically populated with the `wa_id` value as a formatted phone number.

typestring – Optional. Standard Values are CELL, MAIN, IPHONE, HOME, and WORK.

wa_idstring – Optional. WhatsApp ID.

urls

object

Optional.

Contact URL(s) formatted as a urls object.

The object can contain the following fields:

urlstring – Optional. URL.

typestring – Optional. Standard values are HOME and WORK.

Example of a contacts object with pluralized objects nested inside:

"contacts": [
    {
        "addresses": [
            {
                "city": "city name",
                "country": "country name",
                "country_code": "code",
                "state": "Contact's State",
                "street": "Contact's Street",
                "type": "Contact's Address Type",
                "zip": "Contact's Zip Code"
            }
        ],
        "birthday": "birthday",
        "emails": [
            {
                "email": "email",
                "type": "HOME"
            },
            {
                "email": "email",
                "type": "WORK"
            }
        ],
        "name": {
            "first_name": "first name value",
            "formatted_name": "formatted name value",
            "last_name": "last name value",
            "suffix": "suffix value"
        },
        "org": {
            "company": "company name",
            "department": "dep name",
            "title": "title"
        },
        "phones": [
            {
                "phone": "Phone number",
                "wa-id": "WA-ID value",
                "type": "MAIN"
            },
            {
                "phone": "Phone number",
                "type": "HOME"
            },
            {
                "phone": "Phone number",
                "type": "WORK"
            }
        ],
        "urls": [{
            "url": "some url",
            "type": "WORK"
        }]
    }
]

[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. From May 15, 2024, 360dialog will not allow for new numbers to be onboarded with On-Premise API. We will continue supporting already registered On-Premise API throughout 2024, but we strongly recommend to start changing the hosting type of numbers to Cloud as soon as possible. Learn here how to integrate with Cloud API.

POST https://waba.360dialog.io/v1/messages

Request Body

Name
Type
Description

type*

string

Message type: contacts

to*

string

Recipient wa_id

contacts*

object

{
    "messages": [{
       "id": "message-id"
    }]
}
curl --location 'https://waba.360dialog.io/v1/messages' \
--header 'Content-Type: application/json' \
--header 'D360-API-KEY: {{API_KEY}}' \
--data '{
    "to": "WA_ID",
    "type": "contacts",
    "contacts": [
        {
            "addresses": [
                {
                    "street": "STREET",
                    "city": "CITY",
                    "state": "STATE",
                    "zip": "ZIP",
                    "country": "COUNTRY",
                    "country_code": "COUNTRY_CODE",
                    "type": "HOME"
                },
                {
                    "street": "STREET",
                    "city": "CITY",
                    "state": "STATE",
                    "zip": "ZIP",
                    "country": "COUNTRY",
                    "country_code": "COUNTRY_CODE",
                    "type": "WORK"
                }
            ],
            "birthday": "YEAR_MONTH_DAY",
            "emails": [
                {
                    "email": "EMAIL",
                    "type": "WORK"
                },
                {
                    "email": "EMAIL",
                    "type": "HOME"
                }
            ],
            "name": {
                "formatted_name": "NAME",
                "first_name": "FIRST_NAME",
                "last_name": "LAST_NAME",
                "middle_name": "MIDDLE_NAME",
                "suffix": "SUFFIX",
                "prefix": "PREFIX"
            },
            "org": {
                "company": "COMPANY",
                "department": "DEPARTMENT",
                "title": "TITLE"
            },
            "phones": [
                {
                    "phone": "PHONE_NUMBER",
                    "type": "HOME"
                },
                {
                    "phone": "PHONE_NUMBER",
                    "type": "WORK",
                    "wa_id": "PHONE_OR_WA_ID"
                }
            ],
            "urls": [
                {
                    "url": "URL",
                    "type": "WORK"
                },
                {
                    "url": "URL",
                    "type": "HOME"
                }
            ]
        }
    ]
}'

How to block contacts

The Block Users API enables businesses block bad numbers from contacting the account.

When a WhatsApp user is blocked, the following happens:

  • The user cannot contact the business or see that they are online.

  • The business cannot message the user. If so, an error will occur.

Errors on the API occur per-number, since blocks might be successful on some numbers and not others. The Block Users API is synchronous.

To block a contact, you must have received a message from them within the last 24 hours.

Cloud API: Block Users

To block users with Cloud API numbers, please refer to our Partner Documentation. Your ISV partner can block numbers on your behalf.

[will be deprecated] On-premise API: Block Users

POST https://waba.360dialog.io/v1/contacts

Send an API call to /v1/contacts containing an array of registered phone numbers. The phone numbers can be in any standard telephone number format.

Request Body

Name
Type
Description

blocking

string

no_wait (default), wait

contacts

array

+4912345678910

force_check

boolean

false (default), true

{
  "contacts": [ {
    "input": "+55123456789",
    "wa_id": "55123456789", 
    "status": "valid" <- we can send messages to valid contacts only
  }]
}

Example Request

{
  "blocking": "wait",
  "contacts": [
   "+55123456789"
  ],
  "force_check": true
}

Example Response

{
    "contacts": [
        {
            "input": "+55123456789",
            "status": "valid",
            "wa_id": "55123456789"
        }
    ],
    "meta": {
        "api_status": "stable",
        "version": "2.35.4"
    }
}

The response will contain a wa_id. You may use this or another valid wa_id when sending messages using the below request(s).

How to block contacts

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.

POST / v1 / contacts /+ 16315551000 / block
 { "reason" : "Optional string(0;60). Freeform block reason. Will be used when another business account is being blocked" }

When successful, the response will have HTTP status 200and will come without the "errors" object. The failed response looks like this:

{ "errors" : [ { "code" : 2048 , "title" : "Not engaged contact" , "details" : "Invalid Request. This contact has not engaged with you in the last 24 hrs." } ] }   

blocking parameters

The following parameters are supported by POST calls to /v1/contacts/{phone_number}/block:

Settings
Description

reason

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.

phone_number

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

POST / v1 / contacts /+ 16315551000 / unblock

When successful, the response will have HTTP status 200and will come without the "errors" object.

The failed response looks like this:

{ "errors" : [ { "code" : 1009 , "title" : "Parameter value is not valid" , "details" : "Provided WhatsApp ID is not valid. Please provide a valid WhatsApp ID or a phone number with a country code" } ] }   
     

unblock parameters

The following parameters are supported by POST calls to /v1/contacts/{phone_number}/unblock:

Settings
Description

phone_number

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.

GET / v1 / contacts / blocklist ? limit = 10 & offset = 0

You will receive a response with a page from your block list and paging information.

{ "contacts" : [ { "wa_id" : "16315551000@s.whatsapp.net" } ], "pagination" : { "limit" : 10 , "offset" : 0 , "total" : 1 } }
    

block list parameters

The following parameters are supported for GET calls to /v1/contacts/blocklist:

Settings
Description

limit

Optional.

Accepted range is (0;200]. Default: 100.

offset

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.

POST / v1 / contacts /+ 16315551000 / block
 { "reason" : "Optional string(0;60). Freeform block reason. Will be used when another business account is being blocked" , "block" : "true | false optional boolean with default of false" , "message_id" : "message-id. Optional reported message id" }
 

When successful, the response will have HTTP status 200and will come without the "errors" object.

The failed response looks like this:

{ "errors" : [ { "code" : 2048 , "title" : "Not engaged contact" , "details" : "Invalid Request. This contact has not engaged with you in the last 24 hrs." } ] }  

reporting parameters

The following parameters are supported by POST calls to /v1/contacts/{phone_number}/report:

Settings
Description

reason

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.

block

Optional.

The default is False.

If you just want to report or also block the contact.

message_id

Optional.

The ID of the message to be reported. If not specified, the last 5 messages will be sent to WhatsApp.

phone_number

Mandatory.

Numbers can be in any phone number format. The recommended format for contact phone numbers includes a plus sign (+) and country code.

See .

See .

To send contact messages, make a POST call to the /messages endpoint and attach a message object with type=contacts. Then, add a

See

See

sending a Template message
location object.
contacts object.
Location Object
Location Object
Contacts Object.
Contacts Object.
Contacts and Location MessagesUse the message node to send contacts or location messages.