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
  • Base URL
  • Authorization
  • Retrieve your API Key
  • Sending Messages
  • Receiving Messages
  • Webhook Requirements
  • Webhooks (Incoming messages)
  • Callback URL Header Authentication (Optional)

Was this helpful?

  1. waba basics

The Basics (Overview)

This document will help you to get started with the basics such as authorization, sending and receiving messages.

PreviousArchitecture and SecurityNextWebhook Events and Notifications

Last updated 9 months ago

Was this helpful?

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 of numbers to Cloud as soon as possible. .

Base URL

360dialog On-Premise API (old)
360dialog Cloud API (standard)

https://waba.360dialog.io

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

If you want to send a message using the /v1/messages endpoint, you must append the endpoint to your base URL then make the POST request.

Below is an example of a full POST request to the resource: https://waba.360dialog.io/v1/messages

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

Authorization

Currently, there is only 1 method of authorization available, which is the API Key.

Retrieve your API Key

Refer to .

When making POST requests, JSON data specified must be sent as POST data payload.

Each request to the needs to be authorized by adding D360-API-KEY in the header with your unique API Key as a value will grant access.

Example for POST request with curl:

curl \
    -H "D360-API-KEY: {{your-api-key}}" \
    -X POST \
    https://{{base-url}}/v1/messages \
    -H "Accept: application/json"
    ...

Sending Messages

You can send messages by making a POST call to the /messages node regardless of message type. The content of the JSON message body differs for each type of message (text, image, etc.).

If the WABA is registered in Cloud API, the request is as follows:

{ 
   "messaging_product": "whatsapp", 
   "recipient_type": "individual", 
   "to": "PHONE_NUMBER", 
   "type": "text", 
    "text":  {
        "body": "Hello, dear customer!"
    }
}

Below is a simple example to send a text message with 360dialog On-Premise hosting:

POST {{base-url}}/v1/messages
{
  "recipient_type": "individual",
  "to": "whatsapp-id",
  "type": "text",
  "text": {
      "body": "your-message-content"
  }
}

If you are using On-Premise API, remember that it is being discontinued by Meta. No new signups will be allowed with this type of integration from May 15, 2024.

Please note that the parameters may vary based on the hosting type. We recommend referring to our documentation for detailed information on each hosting type request example. On each page of our documentation, you will find the instructions for Cloud or On-premise hosting. If you require further clarification, don't hesitate to reach out to our Support Team for assistance.

Receiving Messages

You must configure a callback (webhook URL) to receive messages.

Webhooks are used for:

  • Inbound message notifications: Use it to get a notification you when you have received a message + message content

  • Message status notifications: Monitor the status of sent messages.

If a webhook event isn't delivered for any reason (e.g., the client is offline) or if the webhook request returns a HTTP status code other than 200, we will retry the webhook delivery. We continue retrying delivery with increasing delays up to a certain timeout (typically 24 hours, though this may vary), or until the delivery succeeds.

Webhook Requirements

To deploy a live webhook that can receive webhook events from the WhatsApp Business API, your code must have the following:

  • HTTPS support

  • A valid SSL certificate

Your webhook must respond with status 200 for all incoming requests. It must also respond to requests in less than 80 milliseconds to prevent errors or delayed messages.

Webhooks (Incoming messages)

In the On-Premise API, all messaging events are associated to a particular phone number. In the Cloud API, all messaging events are associated to a particular WhatsApp Business Account (WABA).

Webhook URLs for Cloud API do not support "_"(underscore) or ":xxxx"(port)in (sub)domain names. Invalid webhook URL: https://your_webhook.example.com Valid webhook URL: https://yourwebhook.example.com Invalid webhook URL:https://subdomain.your_webhook.example.com:3000 Valid webhook URL: https://subdomain.yourwebhook.example.com

Callback URL Header Authentication (Optional)

If the callback URL needs to be authorized by user, USER and PASS should be provided in the header Authorization that contains Basic base64(USER:PASS).

Request body example for USER=testuser and PASS=testpass

{
  "url": "{{your-callback-url}}",
  "headers": {
    "Authorization": "Basic {{token}}"
  }
}

Now, when a message is sent or received, you will receive a message notification to your webhook URL 😀

Numbers registered before this date will still be supported, but should start planning a as soon as possible.

Whenever you have a first number in a WABA using Cloud, a WABA-based Webhook needs to be set. When a WABA only has On-premise numbers (with different Webhooks set per phone number), when a first number changes hosting type to Cloud, their webhook will be set as webhook for the whole WABA. Even if other numbers from this WABA are change hosting type to Cloud, the first one will continue. The only way to change the WABA webhook after that is

start changing the hosting type
Learn here how to integrate with Cloud API
our documentation for API KEY generation
change of hosting type
to use this endpoint.
Example using Postman