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.
Navigating to the API Section
- 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).
| Tab | Purpose |
|---|---|
| API List | Lists every API scope (endpoint) associated with your account, with Show Logs and Test API action buttons. |
| Access Token | Lists 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.
| Field | Description | Example |
|---|---|---|
| Token Name | A human-readable label identifying the application or environment. | My Web App |
| Token Expiry | The date the token automatically expires. Setting a short expiry improves security. | 2026-12-31 |
| Scopes | Checkboxes 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 Name | Path |
|---|---|
| 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
| Field | Description |
|---|---|
| API Token | The token generated in Creating a New API Integration, used to authenticate the test request. |
| WABA Account | The WhatsApp Business Account (WABA) the message will be sent from. Each WABA corresponds to a registered business phone number. |
| Template Category | The category (type) of message template — see Template Categories. |
| Recipient | The destination phone number, in international format, digits only. |
| Source Number | The approved WhatsApp sender number linked to your WABA account. |
| Template | The specific, pre-approved message template to use. |
| Endpoint Type | The 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:
| Language | Notes |
|---|---|
| cURL | Command-line HTTP client — ideal for quick terminal testing. |
| Python | Uses the "requests" library — suitable for backend services and scripts. |
| PHP | Uses the cURL extension — common for server-side web integrations. |
| Node.js | Uses 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.
| Header | Required | Description |
|---|---|---|
| Tenant | Yes | Your unique tenant identifier, in UUID format. Assigned when your account is provisioned; identifies which tenant's configuration, WABA accounts, and templates to use. |
| api-key | Yes | Your secret API key, generated from the portal (see Creating a New API Integration). Keep this confidential. |
| Content-Type | Yes | Must always be "application/json". |
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.
| Placeholder | Maps To | Description |
|---|---|---|
<Tenant_ID> | Tenant header | UUID uniquely identifying your organization on the Monty Mobile platform. Provided at account creation. |
<Your_API_Key> | api-key header | The secret API token generated from the portal. Authenticates every request. |
<Recipient_Phone_Number> | to | Destination phone number in international format — country code + subscriber number, digits only, no + or spaces. Example: 15551XXXXXX (US). |
<Source_Number> | source | The WhatsApp-approved sender number linked to your WABA account; appears as the sender to the recipient. |
<Template_Name> | template.name | Exact name of the approved WhatsApp message template. Case-sensitive. |
<Language_Code> | template.language.code | ISO 639-1 two-letter language code (e.g., en, ar, es). Must match the template's approved language. |
<API_ID> | apiId | UUID 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].to | Used in bulk requests — each message object has its own recipient number, following the same formatting rules as <Recipient_Phone_Number>. |
Quick Reference
| Endpoint | Method | Path |
|---|---|---|
| Send OTP | POST | /api/v2/WhatsappApi/send-otp |
| Send Template Message | POST | /api/v2/WhatsappApi/send-whatsapp |
| Send Bulk Template Messages | POST | /api/v2/WhatsappApi/send-bulk-whatsapp |
Tenant: <Tenant_ID>
api-key: <Your_API_Key>
Content-Type: application/json
https://whatsapp-notification.montymobile.com