API v2 documentation — SendAPI.net

How it works

  1. We connect to the system the phone number from which messages will be sent.
  2. You choose a pricing plan and pay for it in a way convenient for you.
  3. Using our API, you send out your messages.
Code examples:
$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_send",
  "phone"   =>  "77000000000",
  "text"    =>  "Сообщение",
  "file_url" => "https://secure.gravatar.com/avatar/7cab71edb0a4c12a1e64bbfdf46a3c64",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
                                
const data = {
  json_data: JSON.stringify({
    method: "whatsapp_send",
    phone: "77000000000",
    text: "Сообщение",
    file_url: "https://secure.gravatar.com/avatar/7cab71edb0a4c12a1e64bbfdf46a3c64",
    api_id: "<app id>"
  })
};

fetch("https://api.sendapi.net", {
  method: "POST",
  headers: {
    "Content-Type": "application/x-www-form-urlencoded"
  },
  body: new URLSearchParams(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error("Error:", error));
                                
import requests
import json

data = {
    'json_data': json.dumps({
        'method': 'whatsapp_send',
        'phone': '77000000000',
        'text': 'Сообщение',
        'file_url': 'https://secure.gravatar.com/avatar/7cab71edb0a4c12a1e64bbfdf46a3c64',
        'api_id': '<app id>'
    })
}

response = requests.post('https://api.sendapi.net', data=data)
result = response.json()
print(result)
                                
Address:
https://api.sendapi.net
Method:
POST
Parameters for json_data:
Parameter Required Description
method whatsapp_send Send a Whatsapp message
phone yes Recipient phone number or Whatsapp group ID
text yes (required if file_url is not specified) Message text in UTF-8 encoding
file_url yes (required if text is not specified) File link
smap_number no Number of your WhatsApp channel to send the message from; the contact is bound to this channel. If not specified, the system selects the channel
mark_read no true — after sending, mark the dialog as read in the operator chat
operator_id no Id of an account employee (the “Staff” section) on whose behalf the message is sent: an integer greater than zero. If omitted, the message is sent on behalf of the account owner. Not an employee of this account, deleted or blocked — refused without sending (result 2)
api_id yes Your API key
Response to a successful request:

A successful request returns the ID of the sent message, which can later be used to get its status.

{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}
Code examples:
$file_path = 'absolute path /12019526947.jpg';

if (function_exists('curl_file_create')) { // php 5.5+
  $cFile = curl_file_create($file_path);
} else {
  $cFile = '@' . realpath($file_path);
}
$data['json_data'] = json_encode([
  'method' => 'whatsapp_send',
  'phone'  => '77000000000',
  'text'   => 'файл 3',
  'api_id' => '<app id>'
]);
$data['file'] = $cFile;

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
                                
const formData = new FormData();
const fileInput = document.getElementById('fileInput'); // HTML input type="file"

formData.append('json_data', JSON.stringify({
  method: 'whatsapp_send',
  phone: '77000000000',
  text: 'файл 3',
  api_id: '<app id>'
}));
formData.append('file', fileInput.files[0]);

fetch('https://api.sendapi.net', {
  method: 'POST',
  body: formData
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
                                
import requests
import json

file_path = '/path/to/your/file.jpg'

data = {
    'json_data': json.dumps({
        'method': 'whatsapp_send',
        'phone': '77000000000',
        'text': 'файл 3',
        'api_id': '<app id>'
    })
}

files = {
    'file': open(file_path, 'rb')
}

response = requests.post('https://api.sendapi.net', data=data, files=files)
result = response.json()
print(result)
                                
Address:
https://api.sendapi.net
Method:
POST
Parameters for file:
Data of the transferred file
Parameters for json_data:
Parameter Required Description
method whatsapp_send Send a Whatsapp message
phone yes Recipient phone number
text no Message text in UTF-8 encoding
api_id yes Your API key
Response to a successful request:

A successful request returns the ID of the sent message, which can later be used to get its status.

{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"whatsapp_mailing","name":"Рассылка из API","text":"Тестовое сообщение","file_url":"https://api.sendapi.net/img/kp6.png","filter":{"phones":[77000000000,77000000001]},"api_id":"<app id>"}
Code examples:
$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_mailing",
  "name"    =>  "Рассылка из API",
  "text"    =>  "Тестовое сообщение",
  "file_url" => "https://api.sendapi.net/img/kp6.png",
  "filter"  => ["phones" => [77000000000,77000000001]],
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
                                
const data = {
  json_data: JSON.stringify({
    method: "whatsapp_mailing",
    name: "Рассылка из API",
    text: "Тестовое сообщение",
    file_url: "https://api.sendapi.net/img/kp6.png",
    filter: {
      phones: [77000000000, 77000000001]
    },
    api_id: "<app id>"
  })
};

fetch("https://api.sendapi.net", {
  method: "POST",
  headers: {
    "Content-Type": "application/x-www-form-urlencoded"
  },
  body: new URLSearchParams(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error("Error:", error));
                                
import requests
import json

data = {
    'json_data': json.dumps({
        'method': 'whatsapp_mailing',
        'name': 'Рассылка из API',
        'text': 'Тестовое сообщение',
        'file_url': 'https://api.sendapi.net/img/kp6.png',
        'filter': {
            'phones': [77000000000, 77000000001]
        },
        'api_id': '<app id>'
    })
}

response = requests.post('https://api.sendapi.net', data=data)
result = response.json()
print(result)
                                
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_mailing Send a Whatsapp broadcast
name yes Broadcast name
text yes (required if file_url is not specified) Message text in UTF-8 encoding. Limit: from 10 to 2000 characters
file_url yes (required if text is not specified) File link
filter yes Filter, data in JSON format, the JSON must not be empty. Available parameters:
• phones - array of phone numbers, minimum 2 numbers: [77010000000,77010000001];
• category - "all" or category id;
• date_registration - date the number was added, in JSON format: {"from":"2019-01-01 00:00:00","to":"2019-01-31 23:59:59"};
• date_active - date of number activity, in JSON format: {"from":"2019-01-01 00:00:00","to":"2019-01-31 23:59:59"};

The phones parameter has priority: if it is specified, other parameters are not used for filtering
The broadcast is sent only to numbers with the Subscribed status

Examples:
{"category":"all","date_registration":{"from":"2019-01-01 00:00:00","to":"2019-01-31 23:59:59"}
{"phones":[77010000000,77010000001]}
{"category":"all"}
send_date no Date when the broadcast should be launched [format: 2019-02-03 00:00:00]. If not passed, the broadcast starts immediately
api_id yes Your API key
Response to a successful request:

A successful request returns the ID of the sent message, which can later be used to get its status.

{
  "result":0,
  "mailing_id":1
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}
Code examples:
$file_path = 'absolute path /12015426947.jpg';

if (function_exists('curl_file_create')) { // php 5.5+
  $cFile = curl_file_create($file_path);
} else {
  $cFile = '@' . realpath($file_path);
}
$data['json_data'] = json_encode([
  'method'        => 'whatsapp_send_contact_card',
  'phone'         => '77000000000',
  'api_id'        => '<app id>',
  'contact_phone' => '77000000000',
  'contact_name'  => 'Имя контакта',
  'file_url'      => 'https://api.sendapi.net/img/kp6.png',
]);
$data['contact_logo_image'] = $cFile;

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
                                
const formData = new FormData();

formData.append('json_data', JSON.stringify({
  method: 'whatsapp_send_contact_card',
  phone: '77000000000',
  api_id: '<app id>',
  contact_phone: '77000000000',
  contact_name: 'Имя контакта',
  file_url: 'https://api.sendapi.net/img/kp6.png'
}));

// If there is a contact logo file
const fileInput = document.getElementById('logoInput');
if (fileInput && fileInput.files[0]) {
  formData.append('contact_logo_image', fileInput.files[0]);
}

fetch('https://api.sendapi.net', {
  method: 'POST',
  body: formData
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error('Error:', error));
                                
import requests
import json

data = {
    'json_data': json.dumps({
        'method': 'whatsapp_send_contact_card',
        'phone': '77000000000',
        'api_id': '<app id>',
        'contact_phone': '77000000000',
        'contact_name': 'Имя контакта',
        'file_url': 'https://api.sendapi.net/img/kp6.png'
    })
}

# If there is a contact logo file
files = {}
logo_path = '/path/to/contact/logo.jpg'  # path to the logo file
try:
    files['contact_logo_image'] = open(logo_path, 'rb')
except FileNotFoundError:
    pass

response = requests.post('https://api.sendapi.net', data=data, files=files)
result = response.json()
print(result)
                                
Address:
https://api.sendapi.net
Method:
POST
Parameters for file:
Data of the transferred file
Parameters for json_data:
Parameter Required Description
method whatsapp_send_contact_card Send a Whatsapp contact
phone yes Recipient phone number
contact_phone yes Phone number passed in the contact
contact_name yes Contact name
logo_id yes, if the contact_logo_image parameter is not specified Logo ID, which becomes known after the logo is uploaded via the contact_logo_image parameter. [Parameter is deprecated, use file_url]
file_url yes, if the contact_logo_image parameter is not specified Image URL. Image format: jpg, jpeg, png. Example: https://api.sendapi.net/img/kp6.png
api_id yes Your API key
Parameters for contact_logo_image:
contact_logo_image yes, if the logo_id parameter is not specified; if logo_id is specified, the uploaded file will be ignored. Attention: only the jpg, jpeg image format is allowed for sending. Parameter into which the file must be uploaded
Response to a successful request:

On success, only the sending status is returned.

{
  "result":0,
}
Response to a successful request when contact_logo_image is passed:

On success, the sending status and the logo ID are returned; the ID can then be used in the logo_id parameter.

{
  "result":0,
  "logo_id":"100"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"whatsapp_send_geolocation","phone":"77000000000","latitude":"53.284461","longitude":"69.378938","altitude":"5.5","accurate":"5.5","api_id":"<app id>"}
Code examples:
$data['json_data'] = json_encode([
  "method"     =>  "whatsapp_send_geolocation",
  "phone"      =>  "77000000000",
  "latitude"   =>  "53.284461",
  "longitude"  =>  "69.378938",
  "altitude"   =>  "5.5",
  "accurate"   =>  "5.5",
  "api_id"     =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
                                
const data = {
  json_data: JSON.stringify({
    method: "whatsapp_send_geolocation",
    phone: "77000000000",
    latitude: "53.284461",
    longitude: "69.378938",
    altitude: "5.5",
    accurate: "5.5",
    api_id: "<app id>"
  })
};

fetch("https://api.sendapi.net", {
  method: "POST",
  headers: {
    "Content-Type": "application/x-www-form-urlencoded"
  },
  body: new URLSearchParams(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error("Error:", error));
                                
import requests
import json

data = {
    'json_data': json.dumps({
        'method': 'whatsapp_send_geolocation',
        'phone': '77000000000',
        'latitude': '53.284461',
        'longitude': '69.378938',
        'altitude': '5.5',
        'accurate': '5.5',
        'api_id': '<app id>'
    })
}

response = requests.post('https://api.sendapi.net', data=data)
result = response.json()
print(result)
                                
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_send_geolocation Send a Whatsapp geolocation
phone yes Recipient phone number
latitude yes Latitude
longitude yes Longitude
altitude yes Map zoom (the z parameter of the Google Maps link), e.g. 17
accurate yes Accuracy
api_id yes Your API key
Response to a successful request:

A successful request returns the ID of the sent message, which can later be used to get its status.

{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"whatsapp_message_list","message_id":"0","limit":"100","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"      =>  "whatsapp_message_list",
  "message_id"  =>  "0",
  "limit"       =>  "100",
  "api_id"      =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_message_list Get the Whatsapp message list
message_id no Message ID. Default is 0.
phone no Phone number
limit no Number of records per request. Default is 50.
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":[{
              "message_id":1,
              "transport":"whatsapp",
              "message_route":"inbox",
              "message_type":"message-chat",
              "message_text":"123",
              "message_quoted":null,
              "phone":"7700****000",
              "file_url":null,
              "phone_id":426,
              "add_date":"2019-11-28 16:44:09",
              "message_status":2,
              "message_status_name":"delivered_to_device",
              "referral":null,
              "transport_ph_numb":"777****6224"}]
}

referral — a transition from a Click-to-WhatsApp ad: ad ID, click ID and ad data; null — the message is not from an ad. Object fields — as in Webhook.

Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"whatsapp_message_get","message_id":"1","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"      =>  "whatsapp_message_get",
  "message_id"  =>  "1",
  "api_id"      =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_message_get Get the message status
message_id yes Message number
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":[data array]
}

An array element has the same fields as whatsapp_message_list, including referral — a transition from a Click-to-WhatsApp ad (null — the message is not from an ad; object fields — as in Webhook).

Response to an unsuccessful request:
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"whatsapp_phone_list","phone_id":"0","limit":"100","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"    =>  "whatsapp_phone_list",
  "phone_id"  =>  "0",
  "limit"     =>  "100",
  "api_id"    =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_phone_list Get the subscriber list
phone_id no Phone ID. Default is 0.
limit no Number of records per request. Default is 50.
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":[data array]
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"whatsapp_phone_add","phone":"77000000000","name":"Имя","contact_company":"0","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_phone_add",
  "phone"   =>  "77000000000",
  "name"    =>  "Имя",
  "contact_company" => "0",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_phone_add Add a subscriber
phone yes Subscriber Number
name no Subscriber name
contact_company no Whether to send the company contact to the user. 1 - send, 0 - do not send
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":[data array]
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"whatsapp_phone_get","phone":"77000000000","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_phone_get",
  "phone"   =>  "77000000000",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_phone_get Get subscriber data
phone yes Subscriber Number
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":[data array]
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"whatsapp_unsubscribe","phone":"77000000000","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_unsubscribe",
  "phone"   =>  "77000000000",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_unsubscribe Unsubscribe a subscriber from broadcasts
phone yes Subscriber Number
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_description":"Подписчик отписан."
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"whatsapp_group_list","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_group_list",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_group_list Get the list of whatsapp groups
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "groups": [
    {
      "adminCheck":false,
      "admins":["77*********"],
      "subscribers":["77*********","77*********","77*********"],
      "group_id":"whatsapp_group_********-********",
      "name":"Тест группа"
    }
  ]
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"whatsapp_group_get","group_id":"whatsapp_group_*******","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_group_get",
  "group_id"=>  "whatsapp_group_*******",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_group_get Get a whatsapp group
group_id yes group id
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "group":{
    "adminCheck":false,
    "admins":["77*********"],
    "subscribers":["77*********","77*********","77*********"],
    "group_id":"whatsapp_group_********-********",
    "name":"Тест группа"
  }
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"     =>  "whatsapp_group_create",
  "sp_numb"    =>  "1",
  "group_name" =>  "Тест группа",
  "subscribers"=>  ['7700*******'],
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_group_create Create a whatsapp group. This method creates a task to create the group. The group appears only after the task is completed. Task execution time depends on the channel load.
sp_numb yes channel id, can be obtained via the whatsapp_sender_get method
group_name yes Group name
subscribers yes Array of subscribers
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_description":"Задача на создание группы подана успешно. Ожидайте появления группы в списке групп."
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"     =>  "whatsapp_group_contact_set",
  "group_id"   =>  "whatsapp_group_*******",
  "subscribers"=>  ['7700*******'],
  "api_id"     =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_group_contact_set This method creates a task to add subscribers to the group. Subscribers appear only after the task is completed. Task execution time depends on the channel load.
group_id yes group id
subscribers yes Array of subscribers
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_description":"Задача на добавление контактов в группу подана успешно."
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"     =>  "whatsapp_group_contact_del",
  "group_id"   =>  "whatsapp_group_*******",
  "subscribers"=>  ['7700*******'],
  "api_id"     =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_group_contact_del This method creates a task to remove subscribers from the group. Subscribers are removed only after the task is completed. Task execution time depends on the channel load.
group_id yes group id
subscribers yes Array of subscribers
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_description":"Задача на удаление контактов из группу подана успешно."
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"     =>  "whatsapp_group_contact_set_as_admin",
  "group_id"   =>  "whatsapp_group_*******",
  "subscriber" =>  "7700*******",
  "api_id"     =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_group_contact_set_as_admin This method creates a task to grant admin rights to a subscriber in the group. Task execution time depends on the channel load.
group_id yes group id
subscriber yes Subscriber Number
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_description":"Задача на добавление прав админа подана успешно."
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"contact_add","phone":"77000000000","sp_numb":"0","name":"Имя","contact_company":"0","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "contact_add",
  "phone"   =>  "77000000000",
  "sp_numb" =>  "0",
  "name"    =>  "Имя",
  "contact_company" => "0",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method contact_add Add a subscriber with a specified channel
phone yes Subscriber Number
sp_numb yes Channel id, can be obtained via the whatsapp_sender_get method
name no Subscriber name
contact_company no Whether to send the company contact to the user. 1 - send, 0 - do not send
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "phone" : "whatsapp_biz_77000000000", // Returns the number in a format depending on the channel
  "sp_numb" : 0,
  "result_description" : "Подписчик добавлен."
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"whatsapp_sender_get","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_sender_get",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_sender_get Get channel data
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":[]
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"chat_work_list","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "chat_work_list",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method chat_work_list Get the list of contacts in work
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":[]
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"chat_work_update","phone":"77000000000","operator_id":"10","action":"chat_in_work","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "chat_work_update",
  "phone"   =>  "77000000000",
  "operator_id" => "10",
  "action"  => "chat_in_work"
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method chat_work_update Take or close a dialog
phone yes Contact
operator_id yes Operator ID
action yes chat_in_work - Take into work, chat_out_of_work - close the dialog
api_id yes Your API key
Response to a successful request:
{
  "result":0,
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"chat_operator_online","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "chat_operator_online",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method chat_operator_online Get operators online
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":[]
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"operation_mode","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "operation_mode",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method operation_mode Get the operating mode
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":[]
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

The same figures as on the «Statistics» page of the account. Days of the period are counted in the server time zone, returned in the timezone field. Data for today is calculated at the moment of the request.

HTTP request example:

https://api.sendapi.net?json_data={"method":"chat_statistic","date_from":"2026-11-01","date_to":"2026-11-17","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"     =>  "chat_statistic",
  "date_from"  =>  "2026-11-01",
  "date_to"    =>  "2026-11-17",
  "api_id"     =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method chat_statistic Get chat statistics for a period
date_from yes First day of the period in YYYY-MM-DD format.
date_to yes Last day of the period in YYYY-MM-DD format, not later than today. The period is at most 31 days.
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":{
    "date_from":"2026-11-01",
    "date_to":"2026-11-17",
    "timezone":"Asia/Yekaterinburg",
    "chats":248,
    "new_contacts":61,
    "inbox_messages":1932,
    "outbox_messages":2210,
    "finished_dialogs":305,
    "average_response_time":94
  }
}
Fields in result_data:
  • chats — contacts with correspondence during the period (inbound or outbound messages), as on the «Chats» tab.
  • new_contacts — contacts that first appeared in the account during the period.
  • inbox_messages — inbound messages.
  • outbox_messages — outbound messages.
  • finished_dialogs — dialogs finished by employees, across all employees of the account.
  • average_response_time — average response time of employees in seconds: the average of daily values, as on the «Operators» tab; null — no data.
Response to an unsuccessful request (More):
{
  "result":91,
  "result_description":"Период не может быть длиннее 31 дней."
}

The account owner and employees except hidden ones, as on the «Operators» tab of the «Statistics» page. Period and time zone are the same as in chat_statistic.

HTTP request example:

https://api.sendapi.net?json_data={"method":"chat_operator_statistic","date_from":"2026-11-01","date_to":"2026-11-17","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"     =>  "chat_operator_statistic",
  "date_from"  =>  "2026-11-01",
  "date_to"    =>  "2026-11-17",
  "api_id"     =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method chat_operator_statistic Get statistics by employee for a period
date_from yes First day of the period in YYYY-MM-DD format.
date_to yes Last day of the period in YYYY-MM-DD format, not later than today. The period is at most 31 days.
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":{
    "date_from":"2026-11-01",
    "date_to":"2026-11-17",
    "timezone":"Asia/Yekaterinburg",
    "operators":[
      {
        "operator_id":110,
        "name":"Ivan",
        "role":"owner",
        "finished_dialogs":42,
        "average_response_time":75,
        "leads":3,
        "leads_amount":45000
      },
      {
        "operator_id":2150,
        "name":"Anna",
        "role":"operator",
        "finished_dialogs":0,
        "average_response_time":null,
        "leads":0,
        "leads_amount":0
      }
    ]
  }
}
Fields of an operators item:
  • operator_id — employee ID; for the account owner, the account ID.
  • name — employee name.
  • role — owner (account owner) or operator (employee).
  • finished_dialogs — dialogs finished by the employee.
  • average_response_time — average response time of the employee in seconds; null — no data.
  • leads, leads_amount — number and total amount of the employee deals for the period.
Response to an unsuccessful request (More):
{
  "result":90,
  "result_description":"Параметры date_from и date_to обязательны, формат YYYY-MM-DD."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "instagram_send_text",
  "phone"   => "instagram_0000000000",
  "text"    => "Сообщение",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method instagram_send_text Send an instagram message
phone yes Instagram contact. Format: instagram_0000000000.
text yes Message text
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

1. Sending a file by link. PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "instagram_send_file",
  "phone"   => "instagram_0000000000",
  "file_url"=> "https://api.sendapi.net/img/kp6.png",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      

2. Sending as a file. PHP example (with the curl module enabled):


$file_path = 'absolute path /12019526947.jpg';

if (function_exists('curl_file_create')) { // php 5.5+
  $cFile = curl_file_create($file_path);
} else {
  $cFile = '@' . realpath($file_path);
}
$data['json_data'] = json_encode([
  'method' => 'instagram_send_file',
  'phone'  => 'instagram_0000000000',
  'api_id' => '<app id>'
]);
$data['file'] = $cFile;

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method instagram_send_file Send an instagram file
phone yes Instagram contact. Format: instagram_0000000000.
file_url yes File link, required if no file is attached to the request
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "telegram_send_text",
  "phone"   => "telegram_0000000000",
  "text"    => "Сообщение",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      

Sending the first message by @username

If the contact is not yet added to the channel, you can specify `tg_login` and `sp_numb` (channel identifier) instead of `phone`. The server will try to resolve `@username` via the Telegram gateway, automatically create/check the subscription in the specified `sp_numb`, and then send the message.

$data['json_data'] = json_encode([
    "method"  =>  "telegram_send_text",
    "sp_numb" => 123,
    "tg_login"=> "@username",
    "text"    => "Привет! Это первое сообщение.",
    "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
            

Notes:

  • Validation of `tg_login`: the login must match the pattern ^@[a-zA-Z][a-zA-Z0-9_]{4,31}$.
  • sp_numb is the channel identifier (phone_id / smap id). The specified channel must have a configured Telegram slot (tg_v2_slot_id).
  • If the message is not sent and an error code is returned, check that `tg_login` is correct, that the Telegram gateway is available, and that `sp_numb` is present.

Sending to a group topic

If the bot is connected to a group with topics (a forum), the message can be sent to a topic: phone is the group in the form telegram_-1001234567890, topic_id is the topic id from the response of the telegram_create_topic method.

$data['json_data'] = json_encode([
    "method"   =>  "telegram_send_text",
    "phone"    => "telegram_-1001234567890",
    "topic_id" => 42,
    "text"     => "Сообщение в тему",
    "api_id"   =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
            
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method telegram_send_text Send a telegram message
phone yes (required if tg_login is not specified) Telegram contact. Format: telegram_0000000000.
tg_login yes (required if phone is not specified) Telegram login in the @username format — for the first message to a contact who is not yet in the channel
sp_numb yes (required together with tg_login) ID of the channel (phone_id) through which the message is sent by tg_login
topic_id no Id of the group (forum) topic to send the message to: an integer greater than zero, only for a bot group (phone in the form telegram_-1001234567890)
reply_to_message_id no Id of the Telegram message to reply to with a quote: an integer greater than zero, only for a Telegram bot. If the original message has been deleted, the reply is sent without a quote
reply_quote no Fragment of the text of the reply_to_message_id message to quote: 1 to 1024 characters, exactly as in the message, only together with reply_to_message_id. If the fragment is not in the message, the message is not sent
text yes Message text
operator_id no Id of an account employee (the “Staff” section) on whose behalf the message is sent: an integer greater than zero. If omitted, the message is sent on behalf of the account owner. Not an employee of this account, deleted or blocked — refused without sending (result 2)
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Creates a topic (forum) in a Telegram group connected to the account bot with the /connect command. Topics must be enabled in the group, and the bot must be an administrator allowed to manage topics. Pass the topic id from the response in topic_id of the telegram_send_text method.

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "telegram_create_topic",
  "phone"   => "telegram_-1001234567890",
  "name"    => "Клиент · кабинет 123",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method telegram_create_topic Create a topic in a telegram group
phone yes Bot telegram group. Format telegram_-1001234567890.
name yes Topic name, 1 to 128 characters
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "topic_id":42,
  "name":"Клиент · кабинет 123"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Группа не подключена к этому аккаунту",
  "error_code":"not_connected"
}

The reason for the refusal is in the error_code field: not_connected — the group is not connected to the account, topics_not_enabled — topics are not enabled in the group, bot_not_admin — the bot is not an administrator or cannot manage topics, telegram_error — Telegram did not respond.

Sets the bot's reaction on a message in a Telegram group connected to the account bot with the /connect command. The bot has one reaction per message: a new one replaces the previous one, and an empty string in reaction removes it. Only emoji from the Telegram reaction list are allowed (for example 👀, ✍, 👨‍💻, 👌, 🤔, 🤷).

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"     =>  "telegram_set_reaction",
  "phone"      => "telegram_-1001234567890",
  "message_id" => 4242,
  "reaction"   => "👀",
  "api_id"     =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method telegram_set_reaction Set a reaction on a telegram group message
phone yes Bot telegram group. Format telegram_-1001234567890.
message_id yes Id of the Telegram message in the group: an integer greater than zero
reaction yes Reaction emoji from the Telegram list; an empty string removes the bot's reaction
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":4242,
  "reaction":"👀"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Группа не подключена к этому аккаунту",
  "error_code":"not_connected"
}

The reason for the refusal is in the error_code field: not_connected — the group is not connected to the account, bot_not_found, bot_not_owned, bot_not_bound — the group bot was not found, belongs to another account or is not connected to a SendAPI channel, telegram_error — Telegram rejected the reaction (the message is not in the group, the emoji is not allowed in the group) or did not respond.

Moves a message of a Telegram group connected to the account bot with the /connect command to a group topic. Telegram cannot move messages between topics, so the bot forwards the message to the topic (the topic shows “Forwarded from” with the author) and deletes the original. To delete it, the bot must be an administrator allowed to delete messages, and the message must be less than 48 hours old; otherwise the original stays, and deleted in the response is false. The topic id comes from the response of the telegram_create_topic method.

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"     =>  "telegram_move_message",
  "phone"      => "telegram_-1001234567890",
  "message_id" => 4242,
  "topic_id"   => 42,
  "api_id"     =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method telegram_move_message Move a telegram group message to a topic
phone yes Bot telegram group. Format telegram_-1001234567890.
message_id yes Id of the Telegram message in the group: an integer greater than zero
topic_id yes Id of the group topic to move the message to: an integer greater than zero
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":4242,
  "topic_id":42,
  "new_message_id":4250,
  "deleted":true
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Группа не подключена к этому аккаунту",
  "error_code":"not_connected"
}

The reason for the refusal is in the error_code field: not_connected — the group is not connected to the account, bot_not_found, bot_not_owned, bot_not_bound — the group bot was not found, belongs to another account or is not connected to a SendAPI channel, telegram_error — Telegram did not forward the message (the message or topic is not in the group) or did not respond; in this case the original message is not deleted.

Pins a message in a Telegram group connected to the account bot with the /connect command, or unpins it (unpin — true). Pinning does not notify group members. The bot must be a group administrator with the right to pin messages.

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"     =>  "telegram_pin_message",
  "phone"      => "telegram_-1001234567890",
  "message_id" => 4242,
  "unpin"      => false,
  "api_id"     =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method telegram_pin_message Pin a telegram group message
phone yes Bot telegram group. Format telegram_-1001234567890.
message_id yes Id of the Telegram message in the group: an integer greater than zero
unpin no true — unpin the message; false or no parameter — pin it
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":4242,
  "pinned":true
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Бот не администратор группы или у него нет права закреплять сообщения",
  "error_code":"bot_cannot_pin"
}

The reason for the refusal is in the error_code field: not_connected — the group is not connected to the account, bot_not_found, bot_not_owned, bot_not_bound — the group bot was not found, belongs to another account or is not connected to a SendAPI channel, bot_cannot_pin — the bot is not a group administrator or has no right to pin messages, telegram_error — Telegram rejected the request (the message is not in the group) or did not respond.

1. Sending a file by link. PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "telegram_send_file",
  "phone"   => "telegram_0000000000",
  "file_url"=> "https://api.sendapi.net/img/kp6.png",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      

2. Sending as a file. PHP example (with the curl module enabled):


$file_path = 'absolute path /12019526947.jpg';

if (function_exists('curl_file_create')) { // php 5.5+
  $cFile = curl_file_create($file_path);
} else {
  $cFile = '@' . realpath($file_path);
}
$data['json_data'] = json_encode([
  'method' => 'telegram_send_file',
  'phone'  => 'telegram_0000000000',
  'api_id' => '<app id>'
]);
$data['file'] = $cFile;

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method telegram_send_file Send a telegram file
phone yes Telegram contact. Format: telegram_0000000000.
file_url yes File link, required if no file is attached to the request
topic_id no Id of the group (forum) topic to send the message to: an integer greater than zero, only for a bot group (phone in the form telegram_-1001234567890)
reply_to_message_id no Id of the Telegram message to reply to with a quote: an integer greater than zero, only for a Telegram bot. If the original message has been deleted, the reply is sent without a quote
reply_quote no Fragment of the text of the reply_to_message_id message to quote: 1 to 1024 characters, exactly as in the message, only together with reply_to_message_id. If the fragment is not in the message, the message is not sent
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "vk_send_text",
  "phone"   => "vk_0000000000",
  "text"    => "Сообщение",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method vk_send_text Send vk message
phone yes vk contact. Format: vk_0000000000.
text yes Message text
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

1. Sending a file by link. PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "vk_send_file",
  "phone"   => "vk_0000000000",
  "file_url"=> "https://api.sendapi.net/img/kp6.png",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      

2. Sending as a file. PHP example (with the curl module enabled):


$file_path = 'absolute path /12019526947.jpg';

if (function_exists('curl_file_create')) { // php 5.5+
  $cFile = curl_file_create($file_path);
} else {
  $cFile = '@' . realpath($file_path);
}
$data['json_data'] = json_encode([
  'method' => 'vk_send_file',
  'phone'  => 'vk_0000000000',
  'api_id' => '<app id>'
]);
$data['file'] = $cFile;

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method vk_send_file Send vk file
phone yes vk contact. Format: vk_0000000000.
file_url yes File link, required if no file is attached to the request
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "facebook_send_text",
  "phone"   => "facebook_0000000000",
  "text"    => "Сообщение",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method facebook_send_text Send facebook message
phone yes facebook contact. Format: facebook_0000000000.
text yes Message text
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

1. Sending a file by link. PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "facebook_send_file",
  "phone"   => "facebook_0000000000",
  "file_url"=> "https://api.sendapi.net/img/kp6.png",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      

2. Sending as a file. PHP example (with the curl module enabled):


$file_path = 'absolute path /12019526947.jpg';

if (function_exists('curl_file_create')) { // php 5.5+
  $cFile = curl_file_create($file_path);
} else {
  $cFile = '@' . realpath($file_path);
}
$data['json_data'] = json_encode([
  'method' => 'facebook_send_file',
  'phone'  => 'facebook_0000000000',
  'api_id' => '<app id>'
]);
$data['file'] = $cFile;

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method facebook_send_file Send facebook file
phone yes facebook contact. Format: facebook_0000000000.
file_url yes File link, required if no file is attached to the request
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "yandex_send_text",
  "phone"   => "yandex_0000000000",
  "text"    => "Сообщение",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method yandex_send_text Send yandex message
phone yes yandex contact. Format: yandex_0000000000.
text yes Message text
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

1. Sending a file by link. PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "yandex_send_file",
  "phone"   => "yandex_0000000000",
  "file_url"=> "https://api.sendapi.net/img/kp6.png",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      

2. Sending as a file. PHP example (with the curl module enabled):


$file_path = 'absolute path /12019526947.jpg';

if (function_exists('curl_file_create')) { // php 5.5+
  $cFile = curl_file_create($file_path);
} else {
  $cFile = '@' . realpath($file_path);
}
$data['json_data'] = json_encode([
  'method' => 'yandex_send_file',
  'phone'  => 'yandex_0000000000',
  'api_id' => '<app id>'
]);
$data['file'] = $cFile;

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method yandex_send_file Send yandex file
phone yes yandex contact. Format: yandex_0000000000.
file_url yes File link, required if no file is attached to the request
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "viber_bot_send_text",
  "phone"   => "viber_bot_0000000000",
  "text"    => "Сообщение",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method viber_bot_send_text Send viber_bot message
phone yes viber_bot contact. Format: viber_bot_0000000000.
text yes Message text
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

1. Sending a file by link. PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "viber_bot_send_file",
  "phone"   => "viber_bot_0000000000",
  "file_url"=> "https://api.sendapi.net/img/kp6.png",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      

2. Sending as a file. PHP example (with the curl module enabled):


$file_path = 'absolute path /12019526947.jpg';

if (function_exists('curl_file_create')) { // php 5.5+
  $cFile = curl_file_create($file_path);
} else {
  $cFile = '@' . realpath($file_path);
}
$data['json_data'] = json_encode([
  'method' => 'viber_bot_send_file',
  'phone'  => 'viber_bot_0000000000',
  'api_id' => '<app id>'
]);
$data['file'] = $cFile;

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method viber_bot_send_file Send viber_bot file
phone yes viber_bot contact. Format: viber_bot_0000000000.
file_url yes File link, required if no file is attached to the request
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "sendapi_send_text",
  "phone"   => "sendapi_0000000000",
  "text"    => "Сообщение",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method sendapi_send_text Send sendapi message
phone yes sendapi contact. Format: sendapi_0000000000.
text yes Message text
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

1. Sending a file by link. PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "sendapi_send_file",
  "phone"   => "sendapi_0000000000",
  "file_url"=> "https://api.sendapi.net/img/kp6.png",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      

2. Sending as a file. PHP example (with the curl module enabled):


$file_path = 'absolute path /12019526947.jpg';

if (function_exists('curl_file_create')) { // php 5.5+
  $cFile = curl_file_create($file_path);
} else {
  $cFile = '@' . realpath($file_path);
}
$data['json_data'] = json_encode([
  'method' => 'sendapi_send_file',
  'phone'  => 'sendapi_0000000000',
  'api_id' => '<app id>'
]);
$data['file'] = $cFile;

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method sendapi_send_file Send sendapi file
phone yes sendapi contact. Format: sendapi_0000000000.
file_url yes File link, required if no file is attached to the request
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

A message can be sent within 24 hours after the last incoming message from the contact.

To find out whether 24 hours have passed and whether a message can still be sent, use the whatsapp_phone_get method, parameter inbox_time (time is shown in seconds).


PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_biz_send_text",
  "phone"   => "whatsapp_biz_0000000000",
  "text"    => "Сообщение",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_biz_send_text Send WhatsApp Business message
phone yes WhatsApp Business contact. Format: whatsapp_biz_0000000000.
A WhatsApp Business contact who has hidden their number comes with a BSUID (WhatsApp user ID) instead of a number: a contact like whatsapp_biz_US.13491208655302741918. Send to such a contact the same way as to a number.
text yes Message text
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

1. Sending a file by link. PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_biz_send_file",
  "phone"   => "whatsapp_biz_0000000000",
  "file_url"=> "https://api.sendapi.net/img/kp6.png",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      

2. Sending as a file. PHP example (with the curl module enabled):


$file_path = 'absolute path /12019526947.jpg';

if (function_exists('curl_file_create')) { // php 5.5+
  $cFile = curl_file_create($file_path);
} else {
  $cFile = '@' . realpath($file_path);
}
$data['json_data'] = json_encode([
  'method' => 'whatsapp_biz_send_file',
  'phone'  => 'whatsapp_biz_0000000000',
  'api_id' => '<app id>'
]);
$data['file'] = $cFile;

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_biz_send_file Send WhatsApp Business file
phone yes WhatsApp Business contact. Format: whatsapp_biz_0000000000.
A WhatsApp Business contact who has hidden their number comes with a BSUID (WhatsApp user ID) instead of a number: a contact like whatsapp_biz_US.13491208655302741918. Send to such a contact the same way as to a number.
file_url yes File link, required if no file is attached to the request
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1"
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_biz_template_list",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_biz_template_list Get WhatsApp Business templates
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "result_data":[
    {"sp_numb":0000,"phone_number":00000000000,"template_name":"template_1","template_message":"Сообщение","params_count":0}
  ]
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}
$data['json_data'] = json_encode([
  "method"  =>  "whatsapp_biz_template_send",
  "phone"   => "whatsapp_biz_0000000000",
  "template_name" => "template_1",
  "template_params" => ["текст"],
  "api_id" => "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method whatsapp_biz_template_send Send WhatsApp Business template
phone yes WhatsApp Business contact. Format: whatsapp_biz_0000000000.
A WhatsApp Business contact who has hidden their number comes with a BSUID (WhatsApp user ID) instead of a number: a contact like whatsapp_biz_US.13491208655302741918. Send to such a contact the same way as to a number.
template_name yes Template Name
template_params yes Additional template data
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "message_id":"1",
  "user_balance": 0
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

Returns the list of all active channels (numbers) of the account with safe data for all available transports.

HTTP request example:

https://api.sendapi.net?json_data={"method":"channels_list","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "channels_list",
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method channels_list Get channel list
api_id yes Your API key
Fields in result_data:
Field Type Description
sp_numb int Channel ID (used in the sp_numb parameter when sending)
phone_number string Phone number / channel identifier
transport string Transport type: whatsapp, telegram, instagram, vk, facebook, viber_bot, other
active_status string Channel status (on - active)
priority int|null Channel priority (lower = higher priority)
Response to a successful request:
{
  "result": 0,
  "result_data": [
    {
      "sp_numb": 123,
      "transport": "whatsapp",
      "active_status": "on",
      "priority": 1
    },
    {
      "sp_numb": 456,
      "phone_number": "79007654321",
      "transport": "telegram",
      "active_status": "on",
      "priority": 2
    }
  ]
}
Response to an unsuccessful request (More):
{
  "result": 1,
  "result_description": "Параметр method не передан."
}
Code examples:
$data['json_data'] = json_encode([
  "method"  =>  "user_balance",
  "api_id" => "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
                                
const data = {
  json_data: JSON.stringify({
    method: "user_balance",
    api_id: "<app id>"
  })
};

fetch("https://api.sendapi.net", {
  method: "POST",
  headers: {
    "Content-Type": "application/x-www-form-urlencoded"
  },
  body: new URLSearchParams(data)
})
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.error("Error:", error));
                                
import requests
import json

data = {
    'json_data': json.dumps({
        'method': 'user_balance',
        'api_id': '<app id>'
    })
}

response = requests.post('https://api.sendapi.net', data=data)
result = response.json()
print(result)
                                
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method user_balance User balance
api_id yes Your API key
Response to a successful request:
{
  "result":0,
  "user_balance": 0
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

This method is also suitable for unblocking the API if it was blocked due to prolonged incorrect responses to requests to the webhook URL. The request must specify the status 'active'.

Example of sending a message via HTTP:

https://api.sendapi.net?json_data={"method":"webhook_status_update","status":"off","api_id":"<app id>"}

PHP example (with the curl module enabled):

$data['json_data'] = json_encode([
  "method"  =>  "webhook_status_update",
  "status"   =>  "off", // available statuses: 'active', 'off'
  "api_id"  =>  "<app id>"
]);

$ch = curl_init("https://api.sendapi.net");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$body = curl_exec($ch);
curl_close($ch);
      
Address:
https://api.sendapi.net
Method:
GET, POST
Parameters for json_data:
Parameter Required Description
method webhook_status_update Update webhook status
status yes Available statuses: active, timeout, off.
api_id yes Your API key
Response to a successful request:
{
  "result":0
}
Response to an unsuccessful request (More):
{
  "result":1,
  "result_description":"Параметр method не передан."
}

When errors occur, the API returns a JSON response with the result field not equal to 0 and an error description in the result_description field.

Error response example:
{
  "result": 1,
  "result_description": "Параметр method не передан."
}
General error handling principles:
  • Always check the result field in the response
  • When result != 0, handle the error according to the description in result_description
  • Implement retries for temporary errors (codes 42, 6, 72)
  • Do not automatically repeat a request that returned result: 26 (send outcome unknown): a repeat may duplicate the message
  • Check the correctness of the passed parameters before sending the request

Response options:

Response Description
0 Successful result
1 Error
11 Invalid method parameter.
2 The phone parameter is not provided.
21 Invalid phone parameter.
22 Subscriber not found.
23 The WhatsApp Business 24-hour window is closed: the contact has not written for more than 24 hours, and the message is sent without a template (whatsapp_biz_send_text, whatsapp_biz_send_file). Send a template with the whatsapp_biz_template_send method or wait for a message from the contact.
24 whatsapp_unsubscribe: Failed to update subscriber data.
whatsapp_biz_send_file: WhatsApp Business does not accept this file format. The refusal is final: repeating the same send will change nothing, send a file in another format. Supported formats: images JPEG, PNG; video MP4, 3GP; audio AAC, AMR, MP3, M4A, OGG; documents TXT, PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX.
26 Send outcome is unknown: the gateway received the request but did not confirm it, so the message may or may not have been sent. This code is returned by the send methods, in particular *_send_text, *_send_file and whatsapp_biz_template_send.
Do not treat such a response as delivery and do not repeat the same request: a repeat may duplicate the message. Check in the chat in your personal account whether the message was sent, and only then send again.
3 The text parameter is not provided.
31 Invalid text parameter.
32 Message length exceeded. Maximum length is 2000 characters. Send large messages via POST.
4 The api_id parameter is not provided.
41 Invalid api_id parameter.
42 System error. Contact support.
5 The message_id parameter is not provided.
51 Invalid message_id parameter.
52 Failed to get the messages array.
6 Failed to create a message sending task.
61 Data not found.
62 You need to purchase or pay for a plan.
71 Senders not found.
72 Senders are overloaded.
90 The date_from and date_to parameters are missing or not in YYYY-MM-DD format (statistics methods).
91 Invalid period: date_from is later than date_to, date_to is later than today, or the period is longer than 31 days (statistics methods).
92 Failed to get statistics. Repeat the request later.

Webhook

The Webhook link can be configured on the API Settings page

All events are sent using the POST method with the Content-Type: application/json header to the URL you specified. If an authorization token is set in the settings, it is passed in the Authorization HTTP header. The event type is determined by the callback_status field. The fields transport, phone_id, user_id, add_date, reverse_date are present in all events.

Actions that trigger the Webhook:

New incoming message POST <Your webhook url>
Content-Type: application/json
Parameter Value/Type Description
callback_status new_inbox_message Action type. New incoming message
phone string Phone number
transport string Communication channel whatsapp
phone_number string Gateway number connected to the system
phone_id int ID of the gateway connected to the system
message_id int Message ID
message_data Array Message data array (last message). Element fields:
FieldTypeDescription
message_idintMessage ID
message_routestringDirection: inbox / outbox
message_typestringMessage type (message-chat, image, file, etc.)
message_textstringMessage text
message_quotedstring|nullQuoted message (if any)
phonestringContact phone number
A WhatsApp Business contact who has hidden their number comes with a BSUID (WhatsApp user ID) instead of a number: a contact like whatsapp_biz_US.13491208655302741918. Send to such a contact the same way as to a number.
sp_numbintSender gateway ID
file_urlstring|nullAttachment link (if any)
transportstringCommunication channel
add_dateISODateMessage date
referral object|null Ad referral: the client wrote by clicking a Click-to-WhatsApp ad (Instagram, Facebook). null - the message is not from an ad, and all outgoing messages. The object is present only in the client message that started the conversation (text, photo, voice); the ad image, which the system adds as a separate message on WhatsApp app numbers, does not have it - one click corresponds to one message with referral. Field names are the same as in the referral object of the Meta WhatsApp Cloud API. Any field can be null: WhatsApp does not always fill them in. On WhatsApp Business API (WABA) numbers the object is the same, the data is provided by Meta: source_app is always null, ctwa_clid is null for ads in WhatsApp statuses.
FieldTypeDescription
source_typestring|nullReferral source: ad - advertisement
source_idstring|nullAd ID in Meta (as a string: an 18-digit number)
source_urlstring|nullLink to the ad or post
source_appstring|nullWhere the ad was shown: instagram, facebook, whatsapp (for WABA - always null)
ctwa_clidstring|nullAd click ID (Click-to-WhatsApp click ID)
headlinestring|nullAd headline
bodystring|nullAd text
media_typestring|nullAd media: image or video
thumbnail_urlstring|nullAd image or video preview (link to the Meta CDN, stops opening after some time)
"referral": {
  "source_type": "ad",
  "source_id": "120200000000000000",
  "source_url": "https://www.instagram.com/p/EXAMPLE/",
  "source_app": "instagram",
  "ctwa_clid": "ARAkExampleClickId...",
  "headline": "Напишите нам",
  "body": "Текст объявления",
  "media_type": "image",
  "thumbnail_url": "https://scontent.xx.fbcdn.net/..."
}
author object|null Author of a message in a group chat: WhatsApp, Telegram, Instagram and MAX groups, comments on Instagram posts. null — not a group, outgoing messages and a group message without an author. The field exists only in the Webhook: the whatsapp_message_list and whatsapp_message_get methods do not have it.
FieldTypeDescription
phonestring|nullAddress of the private chat with the author: the WhatsApp group member number, tg_ID in Telegram, telegram_ID for a Telegram bot, instagram_ID in Instagram, max_ID in MAX. null — the address is unknown
namestring|nullAuthor name — the name of their contact in the account; for a Telegram bot — the name from the Telegram profile. null — there is no name
"author": {
  "phone": "77001112233",
  "name": "Ivan Petrov"
}
user_id int Client ID in the system
add_date ISODate Date Added
reverse_date ISODate Date Added
New outgoing message POST <Your webhook url>
Content-Type: application/json
Parameter Value/Type Description
callback_status new_outbox_message Action type. A new outgoing message was sent
phone string Contact phone number
transport string Communication channel (whatsapp / telegram / instagram, etc.)
phone_number string Number of the gateway connected to the system
phone_id int ID of the gateway connected to the system
message_id int Message ID
message_data Array Message data array (structure is the same as for an incoming message)
user_id int Client ID in the system
add_date ISODate Date Added
reverse_date ISODate Date Added
New subscriber (contact) POST <Your webhook url>
Content-Type: application/json
Parameter Value/Type Description
callback_status new_subscriber Action type. A new contact/subscriber appeared
phone string Contact phone number
transport string Communication channel
phone_number string Number of the gateway connected to the system
phone_id int ID of the gateway connected to the system
user_id int Client ID in the system
add_date ISODate Date Added
reverse_date ISODate Date Added
Gateway number change POST <Your webhook url>
Content-Type: application/json
Parameter Value/Type Description
callback_status whatsapp_change_gateway_ph_number Action type. The gateway phone number has changed
phone string Contact phone number (if applicable)
transport string Communication channel
phone_number string New number of the gateway connected to the system
phone_id int ID of the gateway connected to the system
user_id int Client ID in the system
add_date ISODate Date Added
reverse_date ISODate Date Added
Taken into work / Dialog finished POST <Your webhook url>
Content-Type: application/json
Parameter Value/Type Description
callback_status chat_in_work/chat_out_of_work Action type. chat_in_work - taken into work. chat_out_of_work - dialog finished
phone string Phone number
transport string Communication channel whatsapp
phone_number string Gateway number connected to the system
phone_id int ID of the gateway connected to the system
hook_body_row json {operator_id:1}. Operator ID
user_id int Client ID in the system
add_date ISODate Date Added
reverse_date ISODate Date Added
Message delivery statuses for WhatsApp POST <Your webhook url>
Content-Type: application/json
Parameter Value/Type Description
callback_status set_delivery_status Action type. The delivery status of the sent message has changed
delivery_status string

Delivery status to numbers

Value Description
4 Message sent
5 Message delivered
13 Message read

Delivery status to groups

Value Description
4 Message sent to the numbers of all participants
5 Message delivered to the numbers of all participants
13 Message read by all group participants
phone string Phone number
transport string WhatsApp communication channel
phone_number string Gateway number connected to the system
phone_id int ID of the gateway connected to the system
user_id int Client ID in the system
add_date ISODate Date Added
reverse_date ISODate Date Added
The contact deleted a message POST <Your webhook url>
Content-Type: application/json

The contact deleted their message (or a group administrator deleted someone else’s). The message in the chat stays as it was, and a service incoming message quoting the deleted one is added to the same conversation — its text is always in Russian, as in the example below. The new_inbox_message event is not sent for the service message. The event does not need to be enabled separately: it comes to the webhook URL together with the other events.

Parameter Value/Type Description
callback_status message_deleted Action type. The contact deleted a message
phone string Contact phone number
transport string Communication channel (whatsapp / telegram / instagram, etc.)
phone_number string Number of the gateway connected to the system
phone_id int ID of the gateway connected to the system
message_id int ID of the service message about the deletion
deleted_message_id int ID of the deleted message — the same message_id that came in the event about it (for example, new_inbox_message)
message_data Array Data array of the service message (structure is the same as for an incoming message): message_text is the notice text in Russian, message_quoted is the text of the deleted message (null if it had no text, for example a file without a caption), phone is the contact phone number. If the service message is not found, a JSON string with response code 61 comes instead of the array.
user_id int Client ID in the system
add_date ISODate Date Added
reverse_date ISODate Date Added

Request body example:

{
  "phone": "77011234567",
  "phone_number": "77000000000",
  "callback_status": "message_deleted",
  "transport": "whatsapp",
  "phone_id": 427,
  "user_id": 1234,
  "add_date": "2026-10-22T09:15:01.000Z",
  "reverse_date": "2026-10-22T09:15:01.000Z",
  "message_id": 5001,
  "deleted_message_id": 4999,
  "message_data": [
    {
      "message_id": 5001,
      "transport": "whatsapp",
      "message_route": "inbox",
      "message_type": "message-chat",
      "message_text": "Пользователь удалил это сообщение",
      "message_quoted": "Завтра в 10:00 подойдёт?",
      "phone": "77011234567",
      "sp_numb": 427,
      "file_url": null,
      "add_date": "2026-10-22T09:15:00.000Z",
      "referral": null,
      "author": null
    }
  ]
}
amoCRM deal events (Meta Conversions API) POST <Your webhook url>
Content-Type: application/json
Enabled by the “Deal webhooks” toggle in the API Settings → AmoCRM section. The webhook link and token are taken from the “Webhook setup” section (SendAPI). Convenient for sending Lead (deal created) and Purchase (successful deal) events to the Meta Conversions API.
Parameter Value/Type Description
callback_status deal_created / deal_status_changed Action type. deal_created - deal created. deal_status_changed - deal status changed
phone string Deal contact phone (for matching with a person in Meta CAPI)
transport string sendapi (CRM event, not tied to a messaging channel)
user_id int Client ID in the system
hook_body_row json Deal data:
Field Type Description
crmstringAlways "amocrm"
eventstringdeal_created / deal_status_changed
deal_idintDeal ID in amoCRM
pipeline_idint|nullPipeline ID
status_idint|nullCurrent deal status
old_status_idint|nullPrevious status (only for deal_status_changed)
pricenumber|nullDeal amount
is_wonbooltrue if status = “successfully completed” (142). Flag for Purchase
responsible_user_idint|nullResponsible manager ID
namestring|nullDeal name
add_date ISODate Date Added
reverse_date ISODate Date Added
Loading...