> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whatsable.app/llms.txt
> Use this file to discover all available pages before exploring further.

# API Documentation

> Notifier by WhatsAble API Documentation

# API

# 📚 Notifier by WhatsAble API Documentation

<div className="bg-blue-50 p-6 rounded-lg my-6">
  <p className="text-lg">
    Welcome to the <span className="font-bold text-blue-600">Notifier by WhatsAble API Documentation</span>! This guide provides comprehensive details on how to use the <span className="font-bold">Notifier API</span> to send WhatsApp messages programmatically. Below, you'll find information on the API endpoint, authentication, request and response structures, error handling, and supported attachment types.
  </p>
</div>

***

## 🚀 API Overview

<div className="bg-white p-6 rounded-lg border border-gray-200 shadow-sm">
  The <span className="font-bold">Notifier API</span> allows you to send WhatsApp messages, including text and attachments, to customers. It's designed to be simple and easy to integrate into your applications or workflows.
</div>

***

## 📌 API Endpoint

<div className="bg-white p-6 rounded-lg border border-gray-200 shadow-sm">
  * **POST**: `https://api.insightssystem.com/api:-GWQv5aM/send`
</div>

***

## 🔑 Authentication

<div className="bg-white p-6 rounded-lg border border-gray-200 shadow-sm">
  To use the API, you need to include an <span className="font-bold">Authorization Token</span> in the request headers. The token must be prefixed with <span className="font-bold">Bearer</span>.

  ### Headers

  * `Content-Type`: `application/json`
  * `Authorization`: `Bearer YOUR_TOKEN_HERE`
</div>

***

## 📤 Request Payload

<div className="bg-white p-6 rounded-lg border border-gray-200 shadow-sm">
  The request body should be a JSON object with the following fields:

  | Field        | Type   | Description                                                                     |
  | ------------ | ------ | ------------------------------------------------------------------------------- |
  | `phone`      | String | The recipient's phone number in **international format** (e.g., `+1234567890`). |
  | `text`       | String | The message content you want to send.                                           |
  | `attachment` | String | (Optional) A public URL to an attachment (e.g., image, PDF, video).             |
  | `filename`   | String | (Optional) The name of the attachment file.                                     |

  ### Example Request Body

  <div className="bg-gray-900 rounded-lg p-4 my-4 overflow-x-auto">
    ```json theme={null}
    {
      "phone": "+1234567890",
      "text": "Hello, this is a test message from Notifier!",
      "attachment": "https://example.com/image.jpg",
      "filename": "image.jpg"
    }
    ```
  </div>
</div>

***

## 📥 Response Structure

<div className="bg-white p-6 rounded-lg border border-gray-200 shadow-sm">
  The API responds with a JSON object. Below are examples of <span className="font-bold">success</span> and <span className="font-bold">error</span> responses.

  ### Success Response

  <div className="bg-gray-900 rounded-lg p-4 my-4 overflow-x-auto">
    ```json theme={null}
    {
      "message": "Message sent successfully"
    }
    ```
  </div>

  ### Error Response

  <div className="bg-gray-900 rounded-lg p-4 my-4 overflow-x-auto">
    ```json theme={null}
    {
      "message": "Message sending failed | Reason: Message limit for this number reached."
    }
    ```
  </div>
</div>

***

## 🛠️ Error Handling

<div className="bg-white p-6 rounded-lg border border-gray-200 shadow-sm">
  The API provides detailed error messages to help you troubleshoot issues. Common errors include:

  1. <span className="font-bold">Invalid Phone Number</span>: Ensure the phone number is in <span className="font-bold">E.164 format</span>.
  2. <span className="font-bold">Message Limit Reached</span>: You've exceeded the allowed number of messages for a specific phone number.
  3. <span className="font-bold">Attachment Issues</span>: Ensure the attachment URL is public and accessible.
  4. <span className="font-bold">Authentication Failure</span>: Verify that the `Authorization` token is correct.
  5. <span className="font-bold">Insufficient Credits</span>: Your account balance is insufficient to send the message.
  6. <span className="font-bold">Subscription Expired</span>: Your subscription has ended, and you need to renew it.
  7. <span className="font-bold">Rate Limit Exceeded</span>: You've exceeded the allowed number of messages per minute or hour.
  8. <span className="font-bold">Unique Number Limit Reached</span>: You've reached the limit of unique phone numbers you can message.
  9. <span className="font-bold">File Size or Type Error</span>: The attachment does not meet WhatsApp's size or type requirements.
  10. <span className="font-bold">No WhatsApp Account</span>: The recipient does not have an active WhatsApp account.
</div>

***

## 📋 Code Examples

<div className="bg-white p-6 rounded-lg border border-gray-200 shadow-sm">
  ### 1. cURL

  <div className="bg-gray-900 rounded-lg p-4 my-4 overflow-x-auto">
    ```bash theme={null}
    curl -X POST https://api.insightssystem.com/api:-GWQv5aM/send \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_TOKEN_HERE" \
    -d '{
      "phone": "+1234567890",
      "text": "Hello, this is a test message from Notifier!",
      "attachment": "https://example.com/image.jpg",
      "filename": "image.jpg"
    }'
    ```
  </div>

  ### 2. JavaScript (Fetch API)

  <div className="bg-gray-900 rounded-lg p-4 my-4 overflow-x-auto">
    ```javascript theme={null}
    fetch("https://api.insightssystem.com/api:-GWQv5aM/send", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
        Authorization: "Bearer YOUR_TOKEN_HERE",
      },
      body: JSON.stringify({
        phone: "+1234567890",
        text: "Hello, this is a test message from Notifier!",
        attachment: "https://example.com/image.jpg",
        filename: "image.jpg",
      }),
    })
      .then((response) => response.json())
      .then((data) => console.log(data))
      .catch((error) => console.error(error));
    ```
  </div>

  ### 3. Python (Requests Library)

  <div className="bg-gray-900 rounded-lg p-4 my-4 overflow-x-auto">
    ```python theme={null}
    import requests
    import json

    url = "https://api.insightssystem.com/api:-GWQv5aM/send"
    headers = {
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_TOKEN_HERE"
    }
    payload = {
        "phone": "+1234567890",
        "text": "Hello, this is a test message from Notifier!",
        "attachment": "https://example.com/image.jpg",
        "filename": "image.jpg"
    }

    response = requests.post(url, headers=headers, data=json.dumps(payload))
    print(response.json())
    ```
  </div>

  ### 4. Go

  <div className="bg-gray-900 rounded-lg p-4 my-4 overflow-x-auto">
    ```go theme={null}
    package main

    import (
    	"bytes"
    	"fmt"
    	"net/http"
    )

    func main() {
    	url := "https://api.insightssystem.com/api:-GWQv5aM/send"
    	payload := []byte(`{
    		"phone": "+1234567890",
    		"text": "Hello, this is a test message from Notifier!",
    		"attachment": "https://example.com/image.jpg",
    		"filename": "image.jpg"
    	}`)

    	req, err := http.NewRequest("POST", url, bytes.NewBuffer(payload))
    	if err != nil {
    		fmt.Println("Error creating request:", err)
    		return
    	}

    	req.Header.Set("Content-Type", "application/json")
    	req.Header.Set("Authorization", "Bearer YOUR_TOKEN_HERE")

    	client := &http.Client{}
    	resp, err := client.Do(req)
    	if err != nil {
    		fmt.Println("Error sending request:", err)
    		return
    	}
    	defer resp.Body.Close()

    	fmt.Println("Response Status:", resp.Status)
    }
    ```
  </div>

  ### 5. Java (HttpURLConnection)

  <div className="bg-gray-900 rounded-lg p-4 my-4 overflow-x-auto">
    ```java theme={null}
    import java.io.OutputStream;
    import java.net.HttpURLConnection;
    import java.net.URL;

    public class Main {
        public static void main(String[] args) {
            try {
                URL url = new URL("https://api.insightssystem.com/api:-GWQv5aM/send");
                HttpURLConnection conn = (HttpURLConnection) url.openConnection();
                conn.setRequestMethod("POST");
                conn.setRequestProperty("Content-Type", "application/json");
                conn.setRequestProperty("Authorization", "Bearer YOUR_TOKEN_HERE");
                conn.setDoOutput(true);

                String payload = "{\"phone\": \"+1234567890\", \"text\": \"Hello, this is a test message from Notifier!\", \"attachment\": \"https://example.com/image.jpg\", \"filename\": \"image.jpg\"}";

                try (OutputStream os = conn.getOutputStream()) {
                    byte[] input = payload.getBytes("utf-8");
                    os.write(input, 0, input.length);
                }

                int responseCode = conn.getResponseCode();
                System.out.println("Response Code: " + responseCode);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
    ```
  </div>
</div>

***

## 📌 Attachment Support

<div className="bg-white p-6 rounded-lg border border-gray-200 shadow-sm">
  The <span className="font-bold">Notifier API</span> supports sending attachments with WhatsApp messages. Below are the supported file types and their size limits:

  ### Supported Media Types

  | **Media Type** | **File Extensions**                    | **MIME Types**                                                                                                     | **Max Size** |
  | -------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------------ |
  | **Images**     | `.jpeg`, `.png`                        | `image/jpeg`, `image/png`                                                                                          | 5 MB         |
  | **Videos**     | `.mp4`, `.3gp`                         | `video/mp4`, `video/3gpp`                                                                                          | 16 MB        |
  | **Documents**  | `.pdf`, `.doc`, `.xls`, `.ppt`, `.txt` | `application/pdf`, `application/msword`, `application/vnd.ms-excel`, `application/vnd.ms-powerpoint`, `text/plain` | 100 MB       |
  | **Audio**      | `.mp3`, `.aac`, `.m4a`, `.ogg`         | `audio/mpeg`, `audio/aac`, `audio/mp4`, `audio/ogg`                                                                | 16 MB        |
</div>

***

## 📌 Key Points to Remember

<div className="bg-white p-6 rounded-lg border border-gray-200 shadow-sm">
  * **Phone Number Format**: Always use the **E.164 format** (e.g., `+1234567890`).
  * **Attachment URL**: Ensure the attachment URL is public and accessible.
  * **Authorization Token**: Include the `Bearer` token in the `Authorization` header.
  * **Error Handling**: Check the `message` field in the response for detailed error information.
  * **Line Break**: In the message for line break or for starting a new line, `\n` needs to be added before the new line. Example:

  Input:
  `Hi there,\nThis is John from Acme Co.`

  Output:
  Hi there,
  This is John from Acme Co.
</div>

***

## ❓ Need Help?

<div className="bg-blue-50 p-6 rounded-lg my-6">
  If you encounter any issues or need further assistance, feel free to reach out to our support team:

  * **Email Support**: [support@whatsable.app](mailto:support@whatsable.app)
  * **Documentation**: [Notifier API Documentation](https://www.notion.so/Documentation-for-Whatsable-Notifier-API-871f707adcd1451bb437f47db27e8abb?pvs=21)
</div>

***

<div className="bg-gradient-to-r from-blue-500 to-blue-600 text-white p-8 rounded-lg my-8">
  <h2 className="text-2xl font-bold mb-4">🚀 Start Sending WhatsApp Messages Today!</h2>

  <div className="space-y-4">
    <a href="https://notifier.whatsable.app/" className="block bg-white text-blue-600 px-6 py-3 rounded-lg font-semibold hover:bg-blue-50 transition-colors">
      Sign Up for Notifier by WhatsAble
    </a>
  </div>
</div>

***

**Disclaimer**: This service is not affiliated with nor endorsed by WhatsApp Inc. The tool uses the WhatsApp API but is not affiliated with WhatsApp.
