Регулярные кампании
GET https://sms.ecofon.business/api/recurring-campaigns/
curl --request GET \
--url 'https://sms.ecofon.business/api/recurring-campaigns/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://sms.ecofon.business/api/recurring-campaigns/' \
--header 'Authorization: Bearer {api_key}' \
| Параметры | Детали | Описание |
|---|---|---|
| page | Необязательный Целое число | Номер страницы, с которой вы хотите получить результаты. По умолчанию: 1. |
| results_per_page | Необязательный Целое число | Кол-во результатов на странице. Допустимые значения: 10, 25, 50, 100, 250, 500, 1000. По умолчанию: 25. |
| search | Необязательный Строка | Строка поиска. |
| search_by | Необязательный Строка | Поле, по которому выполняется поиск. Допустимые значения: content. |
| segment | Необязательный Строка | Filter results by segment. |
| user_id | Необязательный Целое число | Filter results by user ID. |
| datetime_field | Необязательный Строка | Допустимые значения: last_run_datetime, next_run_datetime, datetime, last_datetime |
| datetime_start | Необязательный Строка | Фильтрация результатов, начиная с указанной даты и времени. Формат: Y-m-d H:i:s. |
| datetime_end | Необязательный Строка | Фильтрация результатов до указанной даты и времени. Формат: Y-m-d H:i:s. |
| order_by | Необязательный Строка | Поле сортировки результатов. Допустимые значения: recurring_campaign_id, name, content, last_run_datetime, next_run_datetime, datetime, last_datetime, total_sent_sms, total_pending_sms, total_failed_sms, total_campaigns. |
| order_type | Необязательный Строка | Порядок сортировки результатов. Допустимые значения: ASC (по возрастанию) и DESC (по убыванию). |
{
"data": [
{
"id": 1,
"device_id": 1,
"sim_subscription_id": 1,
"user_id": 1,
"name": "Example",
"content": "Sample message",
"settings": {
"frequency": "daily,
"time": 10:25,
},
"segment": "all",
"is_enabled": true,
"total_sent_sms": 0,
"total_pending_sms": 0,
"total_failed_sms": 0,
"last_sent_datetime": null,
"last_datetime": null,
"datetime": "2026-08-27 04:40:20",
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://sms.ecofon.business/api/recurring-campaigns?page=1",
"last": "https://sms.ecofon.business/api/recurring-campaigns?page=1",
"next": null,
"prev": null,
"self": "https://sms.ecofon.business/api/recurring-campaigns?page=1"
}
}
GET https://sms.ecofon.business/api/recurring-campaigns/{recurring_campaign_id}
curl --request GET \
--url 'https://sms.ecofon.business/api/recurring-campaigns/{recurring_campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://sms.ecofon.business/api/recurring-campaigns/{recurring_campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"device_id": 1,
"sim_subscription_id": 1,
"user_id": 1,
"name": "Example",
"content": "Sample message",
"settings": {
"frequency": "daily,
"time": 10:25,
},
"segment": "all",
"is_enabled": true,
"total_sent_sms": 0,
"total_pending_sms": 0,
"total_failed_sms": 0,
"last_sent_datetime": null,
"last_datetime": null,
"datetime": "2026-08-27 04:40:20",
}
}
POST https://sms.ecofon.business/api/recurring-campaigns
| Параметры | Детали | Описание |
|---|---|---|
| name | Обязательный Строка | - |
| content | Обязательный Строка | - |
| device_id | Обязательный Целое число | - |
| sim_subscription_id | Обязательный Целое число | - |
| frequency | Необязательный Строка | Допустимые значения: daily, weekly, monthly |
| week_days | Необязательный Строка |
Допустимые значения: 1, 2, 3, 4, 5, 6, 7 Доступно, когда: frequency = weekly |
| month_days | Необязательный Строка |
Допустимые значения: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 Доступно, когда: frequency = monthly |
| time | Необязательный Строка | HH:II |
| is_enabled | Необязательный Логический тип | - |
curl --request POST \
--url 'https://sms.ecofon.business/api/recurring-campaigns' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'content=Hello world' \
--form 'device_id=1' \
--form 'sim_subscription_id=1' \
--form 'segment=all' \
--form 'frequency=daily' \
--form 'time=12:15' \
--url 'https://sms.ecofon.business/api/recurring-campaigns' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'content=Hello world' \
--form 'device_id=1' \
--form 'sim_subscription_id=1' \
--form 'segment=all' \
--form 'frequency=daily' \
--form 'time=12:15' \
{
"data": {
"id": 1
}
}
POST https://sms.ecofon.business/api/recurring-campaigns/{recurring_campaign_id}
| Параметры | Детали | Описание |
|---|---|---|
| name | Необязательный Строка | - |
| content | Необязательный Строка | - |
| device_id | Необязательный Целое число | - |
| sim_subscription_id | Необязательный Целое число | - |
| frequency | Необязательный Строка | Допустимые значения: daily, weekly, monthly |
| week_days | Необязательный Строка |
Допустимые значения: 1, 2, 3, 4, 5, 6, 7 Доступно, когда: frequency = weekly |
| month_days | Необязательный Строка |
Допустимые значения: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 Доступно, когда: frequency = monthly |
| time | Необязательный Строка | HH:II |
| is_enabled | Необязательный Логический тип | - |
curl --request POST \
--url 'https://sms.ecofon.business/api/recurring-campaigns/{recurring_campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'content=Hello world' \
--form 'device_id=1' \
--form 'sim_subscription_id=1' \
--form 'segment=all' \
--url 'https://sms.ecofon.business/api/recurring-campaigns/{recurring_campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'content=Hello world' \
--form 'device_id=1' \
--form 'sim_subscription_id=1' \
--form 'segment=all' \
{
"data": {
"id": 1
}
}
DELETE https://sms.ecofon.business/api/recurring-campaigns/{recurring_campaign_id}
curl --request DELETE \
--url 'https://sms.ecofon.business/api/recurring-campaigns/{recurring_campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://sms.ecofon.business/api/recurring-campaigns/{recurring_campaign_id}' \
--header 'Authorization: Bearer {api_key}' \