Whatsapp - Monty Mobile
Contact An Expert Sign Up For Free
Stars background

Developers

Welcome to the Monty Mobile Developer Section! This space provides all the necessary tools and documentation for developers looking to integrate our powerful communication services into their applications.

Welcome to Our API Integration Guide

Whether you’re working on sending SMS, WhatsApp messages, or push notifications, our APIs offer seamless integration with comprehensive features and support. Explore each API to understand how you can use Monty Communication Platform to enhance your communication capabilities.

red pattern

I. WhatsApp API Integration Example

POST Send WhatsApp Campaign

Description

This API is used to create and send a WhatsApp campaign by uploading a file containing the list of recipients. The campaign details such as sender ID and template ID are also included in the request, allowing businesses to send WhatsApp messages in bulk using a predefined template.

Use Case

Imagine you're running a customer engagement campaign for a product launch. By using this API, you can upload a file with all your customer contacts and send a personalized message to them using a predefined WhatsApp template. This is perfect for businesses that need to reach a large audience quickly and efficiently, while still maintaining personalized communication.

API DETAILS

Endpoint https://omni-apis.montymobile.com/notification/api/apikey/v2/WhatsappCampaignApi/campaign-file

AUTHORIZATION

API Key
Key api-key
Value {{api_key}}

HEADERS

Tenant 3d936a5d-1d56-450b-a04c-f1a7b5c2d5d4

EXAMPLE REQUEST

curl

curl --location 'https://omni-apis.montymobile.com/notification/api/apikey/v2/WhatsappCampaignApi/campaign-file' \
--header 'Tenant: 98df9ffe-fa84-41ee-9293-33614722d952' \
--form 'file=@"/C:/Users/naim.jaber/Downloads/Export_Whatsapp_Template (1).csv"' \
--form 'countryCode="961"' \
--form 'Campaign="{
  \"Name\": \"test campaign\",
  \"SenderId\": \"7080303b-8261-49e1-b0f5-18469a3df2af\",
  \"TemplateId\": \"1dddcd26-3084-474e-95ce-bbfd1ea635c4\"
}"

PUT Launch WhatsApp Campaign

Description

This API allows you to launch an already created WhatsApp campaign. After creating the campaign using the Send Campaign API, you can use this API to trigger the campaign to begin sending messages to the recipients.

Use Case

Let’s say you’ve prepared a WhatsApp campaign for an upcoming flash sale. You can schedule the launch using this API, ensuring that your WhatsApp messages are sent out at the right time to all your customers. This API is useful for businesses that want to control the timing of their campaigns to maximize engagement.

API DETAILS

Endpoint https://omni-apis.montymobile.com/notification/api/apikey/v2/WhatsappCampaignApi/campaign-launch

AUTHORIZATION

API Key
Key api-key
Value {{api_key}}

HEADERS

Tenant 3d936a5d-1d56-450b-a04c-f1a7b5c2d5d4

BODY

CampaignId The unique identifier of the campaign you wish to launch.

BODY EXAMPLE

json

{
    "CampaignId": " 3d936a5d-1d56-450b-a04c-f1a7b5c2d5d4"
}

EXAMPLE REQUEST

curl

curl --location --request PUT 'https://omni-apis.montymobile.com/notification/api/apikey/v2/WhatsappCampaignApi/campaign-launch' \
--header 'Tenant: 3d936a5d-1d56-450b-a04c-f1a7b5c2d5d4' \
--data '{
    "CampaignId":"4c19d462-543f-4a1a-8e2a-6db6bbf1d97a"
}'

POST Send OTP via WhatsApp

Description

This API allows you to send a One-Time Password (OTP) to a user's WhatsApp account using a predefined message template. It is ideal for scenarios where a business needs to verify a user's identity, such as during account sign-up, password reset, or two-factor authentication.

Use Case

Imagine you're managing a financial services app, and users need to verify their phone number for account security. By using this API, you can send an OTP to the user's WhatsApp, ensuring secure and verified transactions. This API is a perfect solution for scenarios that require identity verification or transaction authorization, leveraging the convenience and security of WhatsApp.

API DETAILS

Endpoint https://omni-apis.montymobile.com/notification/api/v2/Whatsapp/send-whatsapp

AUTHORIZATION

API Key
Key api-key
Value {{api_key}}

HEADERS

Tenant 3d936a5d-1d56-450b-a04c-f1a7b5c2d5d4

BODY

Destination The phone number of the recipient in international format. Example: "+961XXXXXXXX"
Source The sender’s phone number or messaging ID (e.g., WhatsApp Business number).
ApiId Your API key or authentication ID used to verify the request.
TemplateId The unique identifier of the pre-approved message template to be used in the campaign.

BODY EXAMPLE

json

{
  "Destination": "96170168509",
  "Source": "1234",
  "ApiId": "0a03d595-b35b-4c99-b420-fba157299da6",
  "Link": "",
  "HeaderVariable": "",
  "BodyVariable": "",
  "TemplateId": "c0053db3-de25-44d2-8f8c-c28ae17b1b8a"
}

POST Send WhatsApp Message (Without variables)

Description

This API allows you to send a personalized WhatsApp message to a recipient using a predefined template. It includes variables such as the destination number, message content, and the template ID to tailor the communication for each recipient.

Use Case

Imagine you're running a customer service platform and need to send order confirmations or notifications to users. Using this API, you can send a WhatsApp message confirming the user’s order, complete with personalized details like order ID or customer name. This API is particularly useful for businesses that require automated, yet personalized, communications with their customers via WhatsApp.

API DETAILS

Endpoint https://omni-apis.montymobile.com/notification/api/v2/Whatsapp/send-whatsapp

AUTHORIZATION

API Key
Key api-key
Value {{api_key}}

HEADERS

Tenant 3d936a5d-1d56-450b-a04c-f1a7b5c2d5d4

BODY

Destination The phone number of the recipient in international format. Example: "+961XXXXXXXX"
Source The sender’s phone number or messaging ID (e.g., WhatsApp Business number).
ApiId Your API key or authentication ID used to verify the request.
TemplateId The unique identifier of the pre-approved message template to be used in the campaign.

BODY EXAMPLE

json

{
    "Destination": "<RECIPIENT_PHONE_NUMBER>",
    "Source": "<SENDER_PHONE_NUMBER>",
    "ApiId": "<YOUR_API_ID>",
    "TemplateId": "<TEMPLATE_ID>"
  }

EXAMPLE REQUEST

curl

curl --location 'https://omni-apis.montymobile.com/notification/api/v2/Whatsapp/send-whatsapp' \
  --header 'Tenant: <TENANT_ID>' \
  --header 'api-key: <API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "Destination": "<RECIPIENT_PHONE_NUMBER>",
    "Source": "<SENDER_PHONE_NUMBER>",
    "ApiId": "<YOUR_API_ID>",
    "TemplateId": "<TEMPLATE_ID>"
  }'

POST Send WhatsApp Message (Media in header and variables in body)

Description

This API allows you to send a personalized WhatsApp message to a recipient using a predefined template. It includes variables such as the destination number, message content, and the template ID to tailor the communication for each recipient.

Use Case

Imagine you're running a customer service platform and need to send order confirmations or notifications to users. Using this API, you can send a WhatsApp message confirming the user’s order, complete with personalized details like order ID or customer name. This API is particularly useful for businesses that require automated, yet personalized, communications with their customers via WhatsApp.

API DETAILS

Endpoint https://omni-apis.montymobile.com/notification/api/v2/Whatsapp/send-whatsapp

AUTHORIZATION

API Key
Key api-key
Value {{api_key}}

HEADERS

Tenant 3d936a5d-1d56-450b-a04c-f1a7b5c2d5d4

BODY

Destination The phone number of the recipient in international format. Example: "+961XXXXXXXX"
Source The sender’s phone number or messaging ID (e.g., WhatsApp Business number).
ApiId Your API key or authentication ID used to verify the request.
TemplateId The unique identifier of the pre-approved message template to be used in the campaign.
Link The URL of the image, file, or media to be attached with the message (if applicable).
BodyVariable: A dynamic variable that will be inserted into the template message body (e.g., user name, date, etc.).

BODY EXAMPLE

json

{
    "Destination": "<RECIPIENT_PHONE_NUMBER>",
    "Source": "<SENDER_PHONE_NUMBER>",
    "ApiId": "<YOUR_API_ID>",
    "TemplateId": "<TEMPLATE_ID>",
    "Link": "<MEDIA_LINK", 
    "BodyVariable": "<BODY_VAR>",
  }

EXAMPLE REQUEST

curl

curl --location 'https://omni-apis.montymobile.com/notification/api/v2/Whatsapp/send-whatsapp' \
  --header 'Tenant: <TENANT_ID>' \
  --header 'api-key: <API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
    "Destination": "<RECIPIENT_PHONE_NUMBER>",
    "Source": "<SENDER_PHONE_NUMBER>",
    "ApiId": "<YOUR_API_ID>",
    "Link": "<MEDIA_LINK>", 
    "BodyVariable": "<VARIABLE_VALUE",
    "TemplateId": "<TEMPLATE_ID>"
  }'

POST Send Bulk WhatsApp

Description

This API allows you to send WhatsApp messages in bulk to multiple recipients using a predefined template. It is ideal for large-scale marketing campaigns, customer notifications, or other bulk communications where you need to send the same message to many recipients, with or without slight personalization using variables.

Use Case

Imagine you are running an e-commerce platform and want to inform all your customers about a special promotional sale. By using the Send Bulk WhatsApp API, you can send the same promotional message to thousands of customers, leveraging the WhatsApp platform for direct communication. The predefined template can include dynamic variables like customer names or product categories, making the message more personalized while maintaining the bulk messaging feature.

API DETAILS

Endpoint https://omni-apis.montymobile.com/notification/api/v2/Whatsapp/send-bulk-whatsapp

AUTHORIZATION

API Key
Key api-key
Value {{api_key}}

HEADERS

Tenant 3d936a5d-1d56-450b-a04c-f1a7b5c2d5d4

BODY

Source The sender’s phone number or messaging ID (e.g., WhatsApp Business number).
ApiId Your API key or authentication ID used to verify the request.
TemplateId The unique identifier of the pre-approved message template to be used in the campaign.
whatsappRequests list of clients having the following:
Destination The phone number of the recipient in international format. Example: "+961XXXXXXXX"
Link The URL of the image, file, or media to be attached with the message (if applicable).
FileName The name of the header file in case the template has a file-type header (e.g., "invoice.pdf").
HeaderVariable The dynamic text variable used in the header if the template has a text-type header (e.g., "Hi Raed!").
BodyVariable A dynamic variable that will be inserted into the template message body (e.g., user name, date, etc.).

BODY EXAMPLE

json

{
   "Source": "<SENDER_PHONE_NUMBER>",
    "ApiId": "<YOUR_API_ID>",
    "TemplateId": "<TEMPLATE_ID>",
    “whatsappRequests”: [
        "Destination": "<RECIPIENT_PHONE_NUMBER>",
        "Link": "<MEDIA_LINK", 
        “FileName”: ”<MEDIA_NAME>”,
        "HeaderVariable": "<HEADER_VAR>",
        "BodyVariable": ["<BODY_VAR>"]
   ]
}

EXAMPLE REQUEST

curl

curl --location 'https://omni-apis.montymobile.com/notification/api/v2/Whatsapp/send-bulk-whatsapp' \
--header 'Tenant: 3d936a5d-1d56-450b-a04c-f1a7b5c2d5d4' \
--header 'api-key: 68da964bc9a0134abffc4688b784782352fc4162ae4fd6ec533589db78326bda' \
--header 'Content-Type: application/json' \
--data '{
  "TemplateId": "26c943cf-c2a1-4ef7-ab96-7329c17fc137",
  "Source": "1234",
  "ApiId": "fe662d53-ab1c-41c6-b50f-2d3936f68981",
  "whatsappRequests": [
    {
      "Destination": "96174787848",
      "Link": "",
      "FileName": "",
      "HeaderVariable": "",
      "BodyVariable": [
        "body1"

      ]
      
    }
  ]
}'