WhatsApp Notification API

Introduction

This document is the complete technical reference for Monty Mobile's WhatsApp Notification API (v2). It covers everything a developer needs to integrate WhatsApp messaging into their application, including:

  • Portal onboarding and account setup
  • Token generation and authentication
  • Endpoint specifications and request/response formats
  • Variable definitions and placeholder conventions
  • Code examples in multiple languages

The API enables businesses to send WhatsApp template messages — including OTP codes, marketing campaigns, and transactional notifications — to end users worldwide via the WhatsApp Business Platform (WABA).

Getting Started — Monty Mobile Portal

Before making any API call, you must create an API Integration inside the Monty Mobile Communications Platform (MCP) portal at app.montymobile.com. This section walks through every step of that process.

  • Log in to the portal.
  • In the left-hand navigation panel, click APIs.
  • The main panel displays the API – Integration page, containing two tabs (see table below).
TabPurpose
API ListLists every API scope (endpoint) associated with your account, with Show Logs and Test API action buttons.
Access TokenLists all API tokens you've created, showing name, creation date, expiry date, and active/inactive status.

Creating a New API Integration (Token Generation)

Click "+ Create" (top-right corner of the API page) to open the token creation form.

FieldDescriptionExample
Token NameA human-readable label identifying the application or environment.My Web App
Token ExpiryThe date the token automatically expires. Setting a short expiry improves security.2026-12-31
ScopesCheckboxes representing which API endpoints this token may call. Select only what your application needs (least privilege).send-otp, send-whatsapp

Once submitted, the portal generates a unique API token string.

Whitelisting Your IP Address

For additional security, the portal requires you to register the public IP address of any machine sending API requests:

  • After generating the token, locate the IP Address field.
  • Enter the public IP address of your server.
  • Save your changes.

Requests originating from any non-whitelisted IP address will be rejected with an authentication error.

Testing the API from the Portal

The portal includes a built-in API testing tool that sends a real API call and returns the live response — no code required. It also generates ready-to-use code snippets in your preferred programming language.

Accessing the Test API Tool

  • In the left panel, click APIs.
  • The API List tab is selected by default, showing the available endpoints (see table below).
Endpoint NamePath
Send WhatsApp OTP/api/v2/WhatsappApi/send-otp
WhatsApp Get/api/v2/WhatsappApi/send-whatsapp
WhatsApp Post/api/v2/WhatsappApi/send-bulk-whatsapp
WhatsApp Send Session/api/v2/WhatsappApi/send-session
WhatsApp Media/api/v2/WhatsappApi/get-media
  • Each endpoint row has two actions:
    • Show Logs — view the history of previous API calls for that endpoint (useful for debugging).
    • Test API — open the testing form for that endpoint.

Filling the Test API Form

FieldDescription
API TokenThe token generated in Creating a New API Integration, used to authenticate the test request.
WABA AccountThe WhatsApp Business Account (WABA) the message will be sent from. Each WABA corresponds to a registered business phone number.
Template CategoryThe category (type) of message template — see Template Categories.
RecipientThe destination phone number, in international format, digits only.
Source NumberThe approved WhatsApp sender number linked to your WABA account.
TemplateThe specific, pre-approved message template to use.
Endpoint TypeThe programming language/tool for which the code snippet will be generated.

Generated Code Snippet

Once all fields are filled and the generate button is clicked, the portal produces a complete, ready-to-run code snippet with all values pre-populated. Supported languages:

LanguageNotes
cURLCommand-line HTTP client — ideal for quick terminal testing.
PythonUses the "requests" library — suitable for backend services and scripts.
PHPUses the cURL extension — common for server-side web integrations.
Node.jsUses the "https" or "axios" module — suitable for JavaScript/TypeScript backends.

Authentication & Common Headers

Every HTTP request to the WhatsApp Notification API must include the following headers. Missing or incorrect headers result in a 401 Unauthorized or 403 Forbidden response.

HeaderRequiredDescription
TenantYesYour unique tenant identifier, in UUID format. Assigned when your account is provisioned; identifies which tenant's configuration, WABA accounts, and templates to use.
api-keyYesYour secret API key, generated from the portal (see Creating a New API Integration). Keep this confidential.
Content-TypeYesMust always be "application/json".
Base URL
https://whatsapp-notification.montymobile.com

Variable & Placeholder Definitions

Throughout this document, angle-bracket placeholders represent values you must replace with real data for your environment before executing any request.

PlaceholderMaps ToDescription
<Tenant_ID>Tenant headerUUID uniquely identifying your organization on the Monty Mobile platform. Provided at account creation.
<Your_API_Key>api-key headerThe secret API token generated from the portal. Authenticates every request.
<Recipient_Phone_Number>toDestination phone number in international format — country code + subscriber number, digits only, no + or spaces. Example: 15551XXXXXX (US).
<Source_Number>sourceThe WhatsApp-approved sender number linked to your WABA account; appears as the sender to the recipient.
<Template_Name>template.nameExact name of the approved WhatsApp message template. Case-sensitive.
<Language_Code>template.language.codeISO 639-1 two-letter language code (e.g., en, ar, es). Must match the template's approved language.
<API_ID>apiIdUUID identifying the specific API Integration created in the portal; links the request to the correct token scope and WABA account.
<Recipient_Phone_Number_N>messages[N].toUsed in bulk requests — each message object has its own recipient number, following the same formatting rules as <Recipient_Phone_Number>.

Quick Reference

EndpointMethodPath
Send OTPPOST/api/v2/WhatsappApi/send-otp
Send Template MessagePOST/api/v2/WhatsappApi/send-whatsapp
Send Bulk Template MessagesPOST/api/v2/WhatsappApi/send-bulk-whatsapp
Required Headers (all endpoints)
Tenant: <Tenant_ID>
api-key: <Your_API_Key>
Content-Type: application/json
Base URL
https://whatsapp-notification.montymobile.com