API Documentation

Integrate official Meta WhatsApp Business Platform features into your CRM, ERP, e-commerce, and other systems through the iSend.az REST API.

Getting started

All requests are sent over HTTPS in JSON format. API responses are also returned as JSON.

Base URL https://api.isend.az
Official Meta integration

This documentation applies only to official Meta WhatsApp Business numbers connected to iSend.az.

Authentication

The API key is sent in the JSON body of every request using the apikey field.

JSON
{
  "apikey": "YOUR_API_KEY"
}
Protect your API key

Do not expose the API key in frontend code, public repositories, or share it with third parties.

Endpoints

POST

/get-user-package.json

Returns the user’s active package, number limit, message limit, and API/bulk sending permissions.

Request example

cURL
curl -X POST https://api.isend.az/get-user-package.json \
  -H "Content-Type: application/json" \
  -d '{
    "apikey": "YOUR_API_KEY"
  }'

Successful response

JSON
{
  "success": true,
  "package": {
    "id": 4,
    "num_limit": 3,
    "num_used": 2,
    "msg_limit": 5000,
    "msg_used": 318,
    "allow_bulk": true,
    "allow_api": true,
    "is_unlimited": 0
  }
}
POST

/numbers-list.json

Returns active official Meta WhatsApp numbers connected to the user’s iSend.az account.

cURL
curl -X POST https://api.isend.az/numbers-list.json \
  -H "Content-Type: application/json" \
  -d '{
    "apikey": "YOUR_API_KEY"
  }'
JSON
{
  "success": true,
  "numbers": {
    "205": {
      "number": "994501234567",
      "provider": "meta",
      "status": "active",
      "meta_status": "connected",
      "verified_name": "ERAsoft"
    }
  }
}
Using number_id

The object key in the response, for example 205, is used as number_id in message requests.

POST

/send-message.json

Sends a free-form text or media message within the 24-hour customer service window opened after the customer’s latest message.

Field Type Description
apikeystring

The API key created in the iSend.az dashboard.

number_idinteger

The Meta number ID returned by numbers-list.json.

number_tostring

Recipient number with country code, 10–15 digits, without the + sign.

messagestring

The text to send. Maximum 4096 characters.

media_urlstring

A public HTTPS URL for the image, video, or document to send. Optional.

file_namestring

The filename displayed for a document. Optional.

Text message example

cURL
curl -X POST https://api.isend.az/send-message.json \
  -H "Content-Type: application/json" \
  -d '{
    "apikey": "YOUR_API_KEY",
    "number_id": 205,
    "number_to": "994771234567",
    "message": "Salam, müraciətiniz qeydə alındı."
  }'

Media message example

cURL
curl -X POST https://api.isend.az/send-message.json \
  -H "Content-Type: application/json" \
  -d '{
    "apikey": "YOUR_API_KEY",
    "number_id": 205,
    "number_to": "994771234567",
    "message": "Fayl əlavə olunur.",
    "media_url": "https://example.com/files/document.pdf",
    "file_name": "document.pdf"
  }'
24-hour customer service window

If the window is closed, free-form messages are rejected and META_FREE_TEXT_24H_WINDOW_ERROR is returned. Use an approved Meta template instead.

Successful response

JSON
{
  "success": true,
  "provider": "meta",
  "campaign_id": 102,
  "recipient_id": 5001,
  "message_id": 8001,
  "meta_message_id": "wamid.HBgL...",
  "status": "accepted",
  "message": "Your message was accepted by Meta."
}
POST

/send-bulk-message.json

Creates a campaign for one or more recipients using an approved Meta message template and adds it to the sending queue.

Approved templates only

template_name and template_language must match a template synchronized in iSend.az and approved by Meta.

Field Type Description
apikeystring

The API key created in the iSend.az dashboard.

number_idinteger

The Meta number ID returned by numbers-list.json.

titlestring

The campaign title displayed in iSend.az.

template_namestring

The lowercase name of the Meta template.

template_languagestring

The Meta language code of the template, such as az, en_US, or ru.

recipientsarray

An array of recipient numbers and recipient-specific variables.

Body variables and dynamic URL button example

cURL
curl -X POST https://api.isend.az/send-bulk-message.json \
  -H "Content-Type: application/json" \
  -d '{
    "apikey": "YOUR_API_KEY",
    "number_id": 205,
    "title": "Sifariş məlumatları",
    "template_name": "sifaris_melumati",
    "template_language": "az",
    "recipients": [
      {
        "number_to": "994771234567",
        "variables": {
          "{{1}}": "Elvin",
          "{{2}}": "TS-310111",
          "{{3}}": "Təsdiqləndi"
        },
        "button_values": {
          "0": "TS-310111"
        }
      }
    ]
  }'

Queued campaign response

JSON
{
  "success": true,
  "provider": "meta",
  "campaign_id": 110,
  "queued_count": 1,
  "message": "Meta template campaign added to queue."
}
Variable matching

variables, header_value, and button_values must exactly match the template components. On mismatch, an error is returned with recipient_index.

POST

/campaign-data.json

Returns the current Meta statuses, error details, and status timestamps for campaign recipients.

cURL
curl -X POST https://api.isend.az/campaign-data.json \
  -H "Content-Type: application/json" \
  -d '{
    "apikey": "YOUR_API_KEY",
    "campaign_id": 110
  }'
JSON
{
  "success": true,
  "data": {
    "5001": {
      "provider": "meta",
      "number_from": "994501234567",
      "number_to": "994771234567",
      "message": "Template preview",
      "meta_status": "delivered",
      "error_code": "",
      "error_message": "",
      "is_sent": 1,
      "sent_at": "2026-07-18 11:10:07",
      "delivered_at": "2026-07-18 11:10:10",
      "read_at": null,
      "failed_at": null,
      "created_at": "2026-07-18 11:10:05"
    }
  }
}

Message statuses

After a message is accepted, statuses are updated from Meta webhook events.

accepted

The request was accepted by Meta and a message ID was created.

sent

The message was sent by Meta.

delivered

The message was delivered to the recipient’s WhatsApp device.

read

The message was read by the recipient.

failed

The message was not sent; check error_code and error_message.

Error codes

Error responses contain success set to false and a system code in the error field.

META_FREE_TEXT_24H_WINDOW_ERRORThe 24-hour customer service window is closed.
META_TEMPLATE_NOT_APPROVEDThe template was not found or is not approved by Meta.
META_TEMPLATE_VARIABLES_INVALIDTemplate variables do not match the components.
API_NOT_ALLOWEDAPI access is not enabled in the user’s package.
MESSAGE_LIMIT_EXCEEDEDThe package does not have enough message quota.
JSON
{
  "success": false,
  "provider": "meta",
  "error": "META_TEMPLATE_VARIABLES_INVALID",
  "recipient_index": 0
}