| версия от 2026-02-02 |
Группа методов позволяет обмениваться SMS-сообщениями, получать информацию и управлять пакетами SMS.
Адрес: https://restapi.plusofon.ru
POST api/v1/sms
Метод позволяет отправить SMS-сообщение.
Параметры Body
"text" |
string | текст сообщения |
"number_id" |
integer | ИД номера-отправителя (см. "id" в ответе на запрос получения списка номеров) |
"to" |
number | номер-получатель в международном формате ("7**********") |
"reject_long" |
bool | признак запрета отправки SMS, превышающего максимальную длину (по умолчанию — отправлять, "false") |
"count_pdu" |
bool | признак необходимости возврата в ответе количества сегментов сообщения |
curl -X POST \
"https://restapi.plusofon.ru/api/v1/sms" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Client: 10553" \
-H "Authorization: Bearer {token}" \
-d '{"text":"Hello","number_id":42,"to":79993332210,"reject_long":true,"count_pdu":true}'
const url = new URL(
"https://restapi.plusofon.ru/api/v1/sms"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Client": "10553",
"Authorization": "Bearer {token}",
};
let body = {
"text": "Hello",
"number_id": 42,
"to": 79993332210,
"reject_long": true,
"count_pdu": true
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://restapi.plusofon.ru/api/v1/sms',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Client' => '10553',
'Authorization' => 'Bearer {token}',
],
'json' => [
'text' => 'Hello',
'number_id' => 42,
'to' => 79993332210,
'reject_long' => true,
'count_pdu' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://restapi.plusofon.ru/api/v1/sms'
payload = {
"text": "Hello",
"number_id": 42,
"to": 79993332210,
"reject_long": true,
"count_pdu": true
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Client': '10553',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
В ответе могут возвращаться следующие поля:
"data" |
object | объект с данными отправленного сообщения |
"id" |
string | сквозной ИД отправленного сообщения ("jmx_id" в DLR) |
"success" |
bool | признак успешно выполненного запроса |
"message" |
string | сообщение об ошибке |
{
"data": {
"id": "3610afe59f3242ebbdb03f3484b06b8d"
},
"success": true
}
GET api/v1/sms
Метод позволяет просмотреть список SMS-сообщений.
Параметры Body
"date_from" |
date | фильтр по дате начала |
"date_to" |
date | фильтр по дате окончания |
"incoming" |
integer | фильтр по признаку входящего сообщения возможные варианты:
|
"receiver" |
string | фильтр по номеру-получателю |
"sender" |
string | фильтр по номеру-отправителю |
"limit" |
integer | лимит записей в ответе |
curl -X GET \
-G "https://restapi.plusofon.ru/api/v1/sms" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Client: 10553" \
-H "Authorization: Bearer {token}" \
-d '{"date_from":"2026-02-01","date_to":"2026-02-02","incoming":1,"receiver":"79993332210","sender":"79993332211","limit":10}'
const url = new URL(
"https://restapi.plusofon.ru/api/v1/sms"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Client": "10553",
"Authorization": "Bearer {token}",
};
let body = {
"date_from": "2026-02-01",
"date_to": "2026-02-02",
"incoming": 1,
"receiver": "79993332210",
"sender": "79993332211",
"limit": 10
}
fetch(url, {
method: "GET",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://restapi.plusofon.ru/api/v1/sms',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Client' => '10553',
'Authorization' => 'Bearer {token}',
],
'json' => [
'date_from' => '2026-02-01',
'date_to' => '2026-02-02',
'incoming' => 1,
'receiver' => '79993332210',
'sender' => '79993332211',
'limit' => 10,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://restapi.plusofon.ru/api/v1/sms'
payload = {
"date_from": "2026-02-01",
"date_to": "2026-02-02",
"incoming": 1,
"receiver": "79993332210",
"sender": "79993332211",
"limit": 10
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Client': '10553',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers, json=payload)
response.json()
В ответе возвращается список сообщений:
"data" |
array | массив сообщений |
"created_datetime" |
string | дата создания сообщения |
"sent_datetime" |
string | дата отправки сообщения |
"sender" |
string | номер-отправитель |
"receiver" |
string | номер-получатель |
"msg" |
string | текст сообщения |
"incoming" |
bool | признак входящего сообщения |
"pdu" |
integer | количество сегментов сообщения |
{
"current_page": 1,
"data": [
{
"created_datetime": "2022-07-25 12:59:19",
"sent_datetime": "2022-07-25 12:59:21",
"sender": "79993332210",
"receiver": "79993332211",
"msg": "привет, мир!",
"incoming": false,
"pdu": 1
},
{
"created_datetime": "2022-07-25 13:01:34",
"sent_datetime": "2022-07-25 13:01:36",
"sender": "79993332211",
"receiver": "79993332210",
"msg": "ну да, привет, привет",
"incoming": true,
"pdu": 1
}
],
"first_page_url": "http:\/\/localhost\/api\/v1\/sms?page=1",
"from": 1,
"next_page_url": null,
"path": "http:\/\/localhost\/api\/v1\/sms",
"per_page": 15,
"prev_page_url": null,
"to": 2
}
GET api/v1/sms/dialog/{number}
Метод позволяет получить список диалогов.
Параметры Path
"number" |
string | телефонный номер, по которому необходимо получить диалоги |
Параметры Body
"date_from" |
date | фильтр по дате начала |
"date_to" |
date | фильтр по дате окончания |
curl -X GET \
-G "https://restapi.plusofon.ru/api/v1/sms/dialog" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Client: 10553" \
-H "Authorization: Bearer {token}" \
-d '{"date_from":"2026-02-01","date_to":"2026-02-02"}'
const url = new URL(
"https://restapi.plusofon.ru/api/v1/sms/dialog"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Client": "10553",
"Authorization": "Bearer {token}",
};
let body = {
"date_from": "2026-02-01",
"date_to": "2026-02-02"
}
fetch(url, {
method: "GET",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://restapi.plusofon.ru/api/v1/sms/dialog',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Client' => '10553',
'Authorization' => 'Bearer {token}',
],
'json' => [
'date_from' => '2026-02-01',
'date_to' => '2026-02-02',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://restapi.plusofon.ru/api/v1/sms/dialog'
payload = {
"date_from": "2026-02-01",
"date_to": "2026-02-02"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Client': '10553',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers, json=payload)
response.json()
В ответе возвращается список диалогов:
"data" |
array | массив диалогов |
"id" |
integer | внутренний ИД сообщения |
"jasmax_id" |
string | сквозной ИД сообщения |
"sender" |
string | номер-отправитель |
"receiver" |
string | номер-получатель |
"sent_datetime" |
string | дата отправки сообщения |
"created_datetime" |
string | дата создания сообщения |
"msg" |
string | текст сообщения |
"incoming" |
integer | признак входящего сообщения возможные варианты:
|
"readed" |
integer | признак входящего сообщения возможные варианты:
|
"interlocutor_number" |
string | номер собеседника, по которому определяется диалог |
{
"data": [
{
"id": 15,
"sender": "79993332210",
"receiver": "79993332211",
"sent_datetime": "2022-08-26 10:27:10",
"created_datetime": "2022-08-26 10:27:10",
"msg": "Тест 2",
"incoming": 0,
"readed": 0,
"interlocutor_number": "79993332211",
"jasmax_id": "a7702a80b12d4"
},
{
"id": 114258467,
"sender": "79993332210",
"receiver": "79993332212",
"sent_datetime": "2022-08-17 15:23:29",
"created_datetime": "2022-08-17 15:23:27",
"msg": "Тест 1",
"incoming": 0,
"readed": 0,
"interlocutor_number": "79993332212",
"jasmax_id": "58b90fa618b64186ef"
}
],
"success": true
}
GET api/v1/sms/unread
Метод позволяет получить количество непрочитанных SMS-сообщений.
Не имеет параметров.
curl -X GET \
-G "https://restapi.plusofon.ru/api/v1/sms/unread" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Client: 10553" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://restapi.plusofon.ru/api/v1/sms/unread"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Client": "10553",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://restapi.plusofon.ru/api/v1/sms/unread',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Client' => '10553',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://restapi.plusofon.ru/api/v1/sms/unread'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Client': '10553',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
В ответе может возвращаться:
"data" |
object | объект с количеством непрочитанных сообщений |
"count" |
integer | количество непрочитанных сообщений |
"success" |
bool | признак успешно выполненного запроса |
"message" |
string | сообщение об ошибке |
{
"data": {
"count": 1
},
"success": true
}
PATCH api/v1/sms/dialog/{interlocutor_number}/set-read
Метод позволяет отметить диалог по конкретному номеру, как прочитанный.
Параметры Path
"interlocutor_number" |
string | номер собеседника, по которому определяется диалог (см. "interlocutor_number" в ответе на запрос списка диалогов) |
curl -X PATCH \
-G "https://restapi.plusofon.ru/api/v1/sms/dialog/79993332210/set-read" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Client: 10553" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://restapi.plusofon.ru/api/v1/sms/dialog/79993332210/set-read"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Client": "10553",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "PATCH",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->PATCH(
'https://restapi.plusofon.ru/api/v1/sms/dialog/79993332210/set-read',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Client' => '10553',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://restapi.plusofon.ru/api/v1/sms/dialog/79993332210/set-read'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Client': '10553',
'Authorization': 'Bearer {token}'
}
response = requests.request('PATCH', url, headers=headers)
response.json()
В ответе может возвращаться:
"success" |
bool | признак успешно выполненного запроса |
"message" |
string | сообщение об ошибке |
{
"success": true
}
GET api/v1/sms/packets
Метод позволяет получить список всех доступных пакетов SMS-сообщений.
Не имеет параметров.
curl -X GET \
-G "https://restapi.plusofon.ru/api/v1/sms/packets" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Client: 10553" \
-H "Authorization: Bearer {token}"
const url = new URL(
"https://restapi.plusofon.ru/api/v1/sms/packets"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Client": "10553",
"Authorization": "Bearer {token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://restapi.plusofon.ru/api/v1/sms/packets',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Client' => '10553',
'Authorization' => 'Bearer {token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://restapi.plusofon.ru/api/v1/sms/packets'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Client': '10553',
'Authorization': 'Bearer {token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
В ответе возвращается список пакетов:
"packets" |
array | массив пакетов |
"id" |
string | ИД пакета |
"name" |
string | название пакета |
"description" |
string | описание |
"price" |
float | абонентская плата |
"sms_count" |
integer | количество SMS в пакете |
{
"packets": [
{
"id": "401f6fbc-87db-0df2-6ccf-624161f2c7e3",
"name": "Пакет SMS 0",
"description": "Пакет активирует отправку и прием SMS. ",
"price": 0,
"sms_count": 0
},
{
"id": "8ccddfe2-2a7b-bb2a-40f8-624161d3f93a",
"name": "Пакет SMS 50",
"description": "Пакет на 50 SMS в месяц",
"price": 30,
"sms_count": 50
},
{
"id": "16fade6a-1232-d42f-6012-624162c4c018",
"name": "Пакет SMS 1000",
"description": "Пакет на 1000 SMS в месяц",
"price": 600,
"sms_count": 1000
}
],
"success": true
}
PATCH api/v1/sms/packets
Метод позволяет активировать пакет SMS-сообщений.
Параметры Body
"number_id" |
integer | ИД номера (см. "id" в ответе на запрос получения списка номеров) |
"packet" |
string | ИД пакета (см. "id" в ответе на запрос получения доступных пакетов) |
curl -X PATCH \
"https://restapi.plusofon.ru/api/v1/sms/packets" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Client: 10553" \
-H "Authorization: Bearer {token}" \
-d '{"number_id":42,"packet":"1234"}'
const url = new URL(
"https://restapi.plusofon.ru/api/v1/sms/packets"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Client": "10553",
"Authorization": "Bearer {token}",
};
let body = {
"number_id": 42,
"packet": "1234"
}
fetch(url, {
method: "PATCH",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->patch(
'https://restapi.plusofon.ru/api/v1/sms/packets',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Client' => '10553',
'Authorization' => 'Bearer {token}',
],
'json' => [
'number_id' => 42,
'packet' => '1234',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://restapi.plusofon.ru/api/v1/sms/packets'
payload = {
"number_id": 42,
"packet": "1234"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Client': '10553',
'Authorization': 'Bearer {token}'
}
response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()
В ответе могут возвращаться следующие поля:
"success" |
bool | признак успешно выполненного запроса |
"message" |
string | сообщение об ошибке |
{
"success": true
}
POST api/v1/sms/url
Метод позволяет указать для конкретного номера URL-адрес обработчика входящих SMS, на который будут приходить вебхуки (POST-запросы) с SMS-сообщениями.
Параметры Body
"number" |
string | телефонный номер |
"url" |
string | адрес обработчика |
curl -X POST \
"https://restapi.plusofon.ru/api/v1/sms/url" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Client: 10553" \
-H "Authorization: Bearer {token}" \
-d '{"number":"79993332210","url":"https://domen.my/sms"}'
const url = new URL(
"https://restapi.plusofon.ru/api/v1/sms/url"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Client": "10553",
"Authorization": "Bearer {token}",
};
let body = {
"number": "79993332210",
"url": "https://domen.my/sms"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://restapi.plusofon.ru/api/v1/sms/url',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Client' => '10553',
'Authorization' => 'Bearer {token}',
],
'json' => [
'number' => '79993332210',
'url' => 'https://domen.my/sms',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://restapi.plusofon.ru/api/v1/sms/url'
payload = {
"number": "79993332210",
"url": "https://domen.my/sms"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Client': '10553',
'Authorization': 'Bearer {token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
В ответе могут возвращаться следующие поля:
"success" |
bool | признак успешно выполненного запроса |
"message" |
string | сообщение об ошибке |
{
"success": true
}
DELETE api/v1/sms/url
Метод позволяет удалить для всех номеров (или для конкретного номера) URL-адрес обработчика входящих SMS.
Параметры Body
"number" |
string | телефонный номер (по умолчанию — для всех номеров) |
"url" |
string | адрес обработчика |
curl -X DELETE \
"https://restapi.plusofon.ru/api/v1/sms/url" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Client: 10553" \
-H "Authorization: Bearer {token}" \
-d '{"number":"79993332210","url":"https://domen.my/sms"}'
const url = new URL(
"https://restapi.plusofon.ru/api/v1/sms/url"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Client": "10553",
"Authorization": "Bearer {token}",
};
let body = {
"number": "79993332210",
"url": "https://domen.my/sms"
}
fetch(url, {
method: "DELETE",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://restapi.plusofon.ru/api/v1/sms/url',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Client' => '10553',
'Authorization' => 'Bearer {token}',
],
'json' => [
'number' => '79993332210',
'url' => 'https://domen.my/sms',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://restapi.plusofon.ru/api/v1/sms/url'
payload = {
"number": "79993332210",
"url": "https://domen.my/sms"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Client': '10553',
'Authorization': 'Bearer {token}'
}
response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()
В ответе могут возвращаться следующие поля:
"success" |
bool | признак успешно выполненного запроса |
"message" |
string | сообщение об ошибке |
{
"success": true
}
На URL-адрес обработчика входящих SMS будут приходить вебхуки (POST-запросы) с телом в формате JSON и типом контента «application/json», содержащие SMS-сообщение.
"src_number" |
string | номер-отправитель |
"dst_number" |
string | номер-получатель |
"content" |
string | текст сообщения |
"date" |
string | дата и время получения сообщения |
{
"src_number": "79993332210",
"dst_number": "79993332211",
"content": "мир, привет!",
"date": "2023-07-25 12:29:50"
}
PUT api/v1/sms/dlr-url
Метод позволяет указать для всех номеров URL-адрес обработчика отчётов о доставке (DLR), на который будут приходить вебхуки (POST-запросы) с телом в формате JSON и типом контента «application/json».
Параметры Body
"url" |
string | адрес обработчика |
curl -X PUT \
"https://restapi.plusofon.ru/api/v1/sms/dlr-url" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Client: 10553" \
-H "Authorization: Bearer {token}" \
-d '{"url":"https://domen.my/sms_dlr"}'
const url = new URL(
"https://restapi.plusofon.ru/api/v1/sms/dlr-url"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Client": "10553",
"Authorization": "Bearer {token}",
};
let body = {
"url": "https://domen.my/sms_dlr"
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://restapi.plusofon.ru/api/v1/sms/dlr-url',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Client' => '10553',
'Authorization' => 'Bearer {token}',
],
'json' => [
'url' => 'https://domen.my/sms_dlr',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://restapi.plusofon.ru/api/v1/sms/dlr-url'
payload = {
"url": "https://domen.my/sms_dlr"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Client': '10553',
'Authorization': 'Bearer {token}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
В ответе может возвращаться:
"success" |
bool | признак успешно выполненного запроса |
"message" |
string | сообщение об ошибке |
{
"success": true
}
На URL-адрес обработчика отчётов о доставке (DLR) будут приходить вебхуки (POST-запросы) с телом в формате JSON и типом контента «application/json», содержащие DLR.
"message_status" |
string | статус доставки сообщения возможные варианты:
|
"id" |
string | внутренний ИД сообщения |
"jmx_id" |
string | сквозной ИД сообщения |
{
"message_status": "2",
"id": "a8bca126-a658-4d95-9597-c8dc47fe4170",
"jmx_id": "fad79df82475491da0bba9e9d07cb33e"
}