Developer Documentation

Build with WhatsApp API.

Connect your applications, websites and business systems to your WhatsApp session using authenticated API requests.

Introduction

This API lets an authenticated application make requests to the Munshi Ji WhatsApp API service.

Base URL: https://api.notivo.link

Before you start

  • Obtain an API key from your account/dashboard.
  • Have a WhatsApp session created and connected.
  • Use HTTPS for requests.
  • Keep your API key on your server. Never expose it in public browser JavaScript.
API access depends on your API key, its linked session, and the session's current connection status.

Authentication

Send your API key using either the x-api-key header or the Bearer authorization header.

Option A — API key header

x-api-key: YOUR_API_KEY

Option B — Bearer token

Authorization: Bearer YOUR_API_KEY
Replace YOUR_API_KEY with your actual key. Do not publish real keys in source code, screenshots or public repositories.

Send a WhatsApp Message

POST /api/messages

Send a JSON request containing the session ID, destination phone number and message text.

Request body

{
  "session_id": "YOUR_LINKED_SESSION_ID",
  "to": "923001234567",
  "message": "Hello! This message was sent using the API."
}

Use the destination number in international format. Confirm the accepted number format for your deployment before production use.

cURL

curl -X POST "https://api.notivo.link/api/messages" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "session_id": "YOUR_LINKED_SESSION_ID",
    "to": "923001234567",
    "message": "Hello from Munshi Ji API"
  }'
The session ID in the request must match the session linked to the API key. The WhatsApp session must be connected before sending.

Sessions

These session endpoints require API-key authentication.

GET/api/sessions

List sessions available to the authenticated customer.

POST/api/sessions

Create a session. Check the response for the assigned session ID and follow the session connection flow.

GET/api/sessions/{sessionId}

Retrieve details for a session accessible to the authenticated customer.

POST/api/sessions/{sessionId}/initialize

Request session initialization.

POST/api/sessions/{sessionId}/reconnect

Request a reconnect for a session.

POST/api/sessions/{sessionId}/disconnect

Request disconnection of a session.

Use the exact session ID returned by your API. Request bodies and response formats may vary by operation; inspect each response before automating it.

Session Status

GET /api/session/status

Check the status of the session linked to your API key.

curl "https://api.notivo.link/api/session/status" \
  -H "x-api-key: YOUR_API_KEY"

QR Code

GET /api/session/qr

Request QR information for the session linked to your API key. The session may need initialization first.

curl "https://api.notivo.link/api/session/qr" \
  -H "x-api-key: YOUR_API_KEY"

QR response format and availability depend on the current session state. Scan a valid QR using the WhatsApp account you intend to connect.

PHP Example

Example request using PHP cURL:

<?php
$apiKey = getenv('MUNSHI_API_KEY');

$payload = [
    'session_id' => 'YOUR_LINKED_SESSION_ID',
    'to' => '923001234567',
    'message' => 'Hello from PHP'
];

$ch = curl_init('https://api.notivo.link/api/messages');

curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'x-api-key: ' . $apiKey
    ],
    CURLOPT_POSTFIELDS => json_encode($payload),
    CURLOPT_TIMEOUT => 20
]);

$response = curl_exec($ch);

if ($response === false) {
    error_log(curl_error($ch));
} else {
    echo $response;
}

curl_close($ch);
?>

Server-side JavaScript Example

Use this example in a trusted Node.js backend, not in public frontend code.

const response = await fetch(
  'https://api.notivo.link/api/messages',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': process.env.MUNSHI_API_KEY
    },
    body: JSON.stringify({
      session_id: 'YOUR_LINKED_SESSION_ID',
      to: '923001234567',
      message: 'Hello from Node.js'
    })
  }
);

const result = await response.json();
console.log(response.status, result);

Errors & Troubleshooting

401 — Authentication required or invalid

Check that the API key is present and copied correctly.

403 — Access denied

Check API-key permissions, customer status and whether the requested session belongs to that key.

Session not connected

Open your dashboard, check the session state, and complete the QR connection flow if required.

404 — Endpoint not found

Verify the path and HTTP method. The send-message endpoint is POST /api/messages, not a random test path.

5xx — Server error

Check the server logs and session state. Retry only after confirming whether the original message was sent.

For production integrations, log HTTP status and safe error details. Never log API keys or other credentials.