MM Lite versus Cloud API
Let’s see how sending a marketing message works with the Cloud API — and how easy it is to do the same with MM Lite
Last updated
Was this helpful?
Let’s see how sending a marketing message works with the Cloud API — and how easy it is to do the same with MM Lite
Last updated
Was this helpful?
“You only need to update your endpoint to start using MM Lite.”
Base URL
https://waba-v2.360dialog.io/messages
https://waba-v2.360dialog.io/marketing_messages
Authentication
Same API Key
Same API Key
Payload Format
Identical
Identical
Webhook Behavior
Same structure
Same structure
We recommend running your own tests by switching your endpoint and observing the results.
✅ No need to change payloads
✅ No need to change webhook logic
✅ Keep your existing token
MM Lite is designed to make your life easier. Start small: test one flow, and evaluate performance gains.
Currently, it is not possible to identify which end-user number clicked on the marketing message link.
curl --location 'https://waba-v2.360dialog.io/messages' \
--header 'D360-API-KEY: <api_key>' \
--header 'Content-Type: application/json' \
--data '{
"to": "<end_client_number>",
"type": "template",
"template": {
"name": "<template_name>",
"language": {
"code": "<template_language_code>"
},
"components": []
},
"messaging_product": "whatsapp"
}'
import requests
import json
url = "https://waba-v2.360dialog.io/messages"
headers = {
"D360-API-KEY": "<api_key>",
"Content-Type": "application/json"
}
payload = {
"to": "<end_client_number>",
"type": "template",
"template": {
"name": "<template_name>",
"language": {
"code": "<template_language_code>"
},
"components": []
},
"messaging_product": "whatsapp"
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.status_code)
print(response.json())
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://waba-v2.360dialog.io/messages")
headers = {
"D360-API-KEY" => "<api_key>",
"Content-Type" => "application/json"
}
payload = {
to: "<end_client_number>",
type: "template",
template: {
name: "<template_name>",
language: {
code: "<template_language_code>"
},
components: []
},
messaging_product: "whatsapp"
}
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri, headers)
request.body = payload.to_json
response = http.request(request)
puts response.code
puts response.body
const axios = require('axios');
const url = 'https://waba-v2.360dialog.io/messages';
const headers = {
'D360-API-KEY': '<api_key>',
'Content-Type': 'application/json'
};
const payload = {
to: '<end_client_number>',
type: 'template',
template: {
name: '<template_name>',
language: {
code: '<template_language_code>'
},
components: []
},
messaging_product: 'whatsapp'
};
axios.post(url, payload, { headers })
.then(response => {
console.log(response.status);
console.log(response.data);
})
.catch(error => {
console.error(error.response ? error.response.data : error.message);
});
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
"phone_number_id": "BUSINESS_PHONE_NUMBER_ID"
},
"statuses": [
{
"id": "<WHATSAPP_MESSAGE_ID>",
"status": "sent",
"timestamp": "TIMESTAMP",
"recipient_id": "<CUSTOMER_PHONE_NUMBER>",
"conversation": {
"id": "<conversation_id>",
"expiration_timestamp": "TIMESTAMP",
"origin": {
"type": "marketing"
}
},
"pricing": {
"billable": true,
"pricing_model": "CBP",
"category": "marketing"
}
}
]
},
"field": "messages"
}
]
}
]
}
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "<WHATSAPP_BUSINESS_ACCOUNT_ID>",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
"phone_number_id": "BUSINESS_PHONE_NUMBER_ID"
},
"statuses": [
{
"id": "<WHATSAPP_MESSAGE_ID>",
"status": "delivered",
"timestamp": "TIMESTAMP",
"recipient_id": "<CUSTOMER_PHONE_NUMBER>",
"conversation": {
"id": "<conversation_id>",
"origin": {
"type": "marketing"
}
},
"pricing": {
"billable": true,
"pricing_model": "CBP",
"category": "marketing"
}
}
]
},
"field": "messages"
}
]
}
]
}
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
"phone_number_id": "BUSINESS_PHONE_NUMBER_ID"
},
"statuses": [
{
"id": "WHATSAPP_MESSAGE_ID",
"status": "read",
"timestamp": "TIMESTAMP",
"recipient_id": "CUSTOMER_PHONE_NUMBER"
}
]
},
"field": "messages"
}
]
}
]
}
curl --location 'https://waba-v2.360dialog.io/marketing_messages' \
--header 'D360-API-KEY: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "<end_client_number>",
"type": "template",
"template": {
"name": "<template_name>",
"language": {
"policy": "deterministic",
"code": "<template_language_code>"
}
},
"message_activity_sharing":true
}'
import requests
import json
url = "https://waba-v2.360dialog.io/marketing_messages"
headers = {
"D360-API-KEY": "<API_KEY>",
"Content-Type": "application/json"
}
payload = {
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "<end_client_number>",
"type": "template",
"template": {
"name": "<template_name>",
"language": {
"policy": "deterministic",
"code": "<template_language_code>"
}
},
"message_activity_sharing": True
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.status_code)
print(response.json())
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse("https://waba-v2.360dialog.io/marketing_messages")
headers = {
"D360-API-KEY" => "<API_KEY>",
"Content-Type" => "application/json"
}
payload = {
messaging_product: "whatsapp",
recipient_type: "individual",
to: "<end_client_number>",
type: "template",
template: {
name: "<template_name>",
language: {
policy: "deterministic",
code: "<template_language_code>"
}
},
message_activity_sharing: true
}
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.request_uri, headers)
request.body = payload.to_json
response = http.request(request)
puts response.code
puts response.body
const axios = require('axios');
const url = 'https://waba-v2.360dialog.io/marketing_messages';
const headers = {
'D360-API-KEY': '<API_KEY>',
'Content-Type': 'application/json'
};
const payload = {
messaging_product: 'whatsapp',
recipient_type: 'individual',
to: '<end_client_number>',
type: 'template',
template: {
name: '<template_name>',
language: {
policy: 'deterministic',
code: '<template_language_code>'
}
},
message_activity_sharing: true
};
axios.post(url, payload, { headers })
.then(response => {
console.log(response.status);
console.log(response.data);
})
.catch(error => {
console.error(error.response ? error.response.data : error.message);
});
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
"phone_number_id": "BUSINESS_PHONE_NUMBER_ID"
},
"statuses": [
{
"id": "<WHATSAPP_MESSAGE_ID>",
"status": "sent",
"timestamp": "TIMESTAMP",
"recipient_id": "<CUSTOMER_PHONE_NUMBER>",
"conversation": {
"id": "<conversation_id>",
"expiration_timestamp": "TIMESTAMP",
"origin": {
"type": "marketing_lite"
}
},
"pricing": {
"billable": true,
"pricing_model": "CBP",
"category": "marketing_lite"
}}]},
"field": "messages"
}]}]}
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
"phone_number_id": "BUSINESS_PHONE_NUMBER_ID"
},
"statuses": [
{
"id": "<WHATSAPP_MESSAGE_ID>",
"status": "delivered",
"timestamp": "TIMESTAMP",
"recipient_id": "TIMESTAMP",
"conversation": {
"id": "<conversation_id>",
"origin": {
"type": "marketing_lite"
}
},
"pricing": {
"billable": true,
"pricing_model": "CBP",
"category": "marketing_lite"
}
}
]
},
"field": "messages"
}
]
}
]
}
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
"phone_number_id": "BUSINESS_PHONE_NUMBER_ID"
},
"statuses": [
{
"id": "<WHATSAPP_MESSAGE_ID>",
"status": "read",
"timestamp": "TIMESTAMP",
"recipient_id": "<CUSTOMER_PHONE_NUMBER>"
}
]
},
"field": "messages"
}
]
}
]
}
{
"object": "whatsapp_business_account",
"entry": [
{
"id": "WHATSAPP_BUSINESS_ACCOUNT_ID",
"changes": [
{
"value": {
"messaging_product": "whatsapp",
"metadata": {
"display_phone_number": "BUSINESS_DISPLAY_PHONE_NUMBER",
"phone_number_id": "BUSINESS_PHONE_NUMBER_ID"
},
"user_actions": [
{
"timestamp": "TIMESTAMP",
"action_type": "marketing_messages_link_click",
"marketing_messages_link_click_data": {
"tracking_token": "<TRACKING_TOKEN>",
"click_id": "<CLICK_ID>",
"click_component": "CTA"
}}]},
"field": "messages"
}]}]}
As you may know, we typically expect to receive three webhooks: sent, delivered, and read. However, when a user clicks the link inside a marketing template message sent via the Cloud API, no webhooks are triggered at all.
Now let´s see how it works when we send the same marketing template message using the MM Lite API:
If you see, we only need to use a different endpoint; nothing else is required. The same webhooks are returned, but with a big change: we collect the click event.
It includes the value "marketing_lite" to indicate that it was sent using the MM Lite API:
It will show you a click_id and a tracking_token.