Кампанії
GET https://pusher.cv/api/campaigns/
curl --request GET \
--url 'https://pusher.cv/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pusher.cv/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
| Параметри | Деталі | Опис |
|---|---|---|
| page | Необов'язково Ціле число | Номер сторінки, з якої ви хочете отримати результати. За замовчуванням 1 |
| results_per_page | Необов'язково Ціле число | Скільки результатів ви хочете на сторінці. Дозволені значення: 10 , 25 , 50 , 100 , 250 , 500 , 1000. За замовчуванням 25. |
{
"data": [
{
"id": 1,
"user_id": 1,
"website_id": 1,
"name": "Example",
"title": "Sample message",
"description": "This is coming from the API.",
"url": "https://example.com",
"image_url": null,
"segment": "all",
"settings": {
"is_scheduled": 0,
"ttl": 2419200,
"urgency": "normal",
"is_silent": 0,
"is_auto_hide": 0,
"button_title_1": "",
"button_url_1": "",
"button_title_2": "",
"button_url_2": ""
},
"subscribers_ids": [
1,2,3,4,5
],
"sent_subscribers_ids": [],
"total_sent_push_notifications": 0,
"total_push_notifications": 1,
"total_displayed_push_notifications": 0,
"total_clicked_push_notifications": 0,
"total_closed_push_notifications": 0,
"status": "draft",
"scheduled_datetime": "2024-08-09 00:16:22",
"last_sent_datetime": null,
"last_datetime": null,
"datetime": "2026-07-18 18:32:11",
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://pusher.cv/api/campaigns?page=1",
"last": "https://pusher.cv/api/campaigns?page=1",
"next": null,
"prev": null,
"self": "https://pusher.cv/api/campaigns?page=1"
}
}
GET https://pusher.cv/api/campaigns/{campaign_id}
curl --request GET \
--url 'https://pusher.cv/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pusher.cv/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"user_id": 1,
"website_id": 1,
"name": "Example",
"title": "Sample message",
"description": "This is coming from the API.",
"url": "https://example.com",
"image_url": null,
"segment": "all",
"settings": {
"is_scheduled": 0,
"ttl": 2419200,
"urgency": "normal",
"is_silent": 0,
"is_auto_hide": 0,
"button_title_1": "",
"button_url_1": "",
"button_title_2": "",
"button_url_2": ""
},
"subscribers_ids": [
1,2,3,4,5
],
"sent_subscribers_ids": [],
"total_sent_push_notifications": 0,
"total_push_notifications": 1,
"total_displayed_push_notifications": 0,
"total_clicked_push_notifications": 0,
"total_closed_push_notifications": 0,
"status": "draft",
"scheduled_datetime": "2024-08-09 00:16:22",
"last_sent_datetime": null,
"last_datetime": null,
"datetime": "2026-07-18 18:32:11",
}
}
POST https://pusher.cv/api/campaigns
| Параметри | Деталі | Опис |
|---|---|---|
| website_id | Обов'язково Ціле число | - |
| name | Обов'язково Рядок | - |
| title | Обов'язково Рядок | - |
| description | Обов'язково Рядок | - |
| url | Необов'язково Рядок | - |
| image | Необов'язково Файл | - |
| button_title_1 | Необов'язково Рядок | - |
| button_url_1 | Необов'язково Рядок | - |
| button_title_2 | Необов'язково Рядок | - |
| button_url_2 | Необов'язково Рядок | - |
| is_scheduled | Необов'язково Булевий | - |
| scheduled_datetime | Необов'язково Рядок | - |
| is_silent | Необов'язково Булевий | - |
| is_auto_hide | Необов'язково Булевий | - |
| ttl | Необов'язково Рядок | Дозволені значення: 0 , 900 , 1800 , 3600 , 10800 , 21600 , 43200 , 86400 , 259200 , 432000 , 604800 , 1209600 , 2419200 |
| segment | Необов'язково Рядок | Дозволені значення: all , custom , filter , INT segment_id |
| subscribers_ids | Необов'язково Рядок | Доступно, коли: segment = custom |
| filters_custom_parameter_key[index] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_custom_parameter_condition[index] | Необов'язково Рядок |
Дозволені значення: exact, not_exact, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, bigger_than, lower_than Доступно, коли: segment = filter |
| filters_custom_parameter_value[index] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_subscribed_on_url | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_cities | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_countries[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_continents[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_device_type[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_languages[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_operating_systems[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_browsers[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| utm_source | Необов'язково Рядок | - |
| utm_medium | Необов'язково Рядок | - |
| utm_campaign | Необов'язково Рядок | - |
| save | Необов'язково Булевий | Зберегти чернетку |
| send | Необов'язково Булевий | Надіслати кампанію |
curl --request POST \
--url 'https://pusher.cv/api/campaigns' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'website_id=1' \
--form 'title=Example title' \
--form 'description=Example description' \
--url 'https://pusher.cv/api/campaigns' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'website_id=1' \
--form 'title=Example title' \
--form 'description=Example description' \
{
"data": {
"id": 1
}
}
POST https://pusher.cv/api/campaigns/{campaign_id}
| Параметри | Деталі | Опис |
|---|---|---|
| website_id | Необов'язково Ціле число | - |
| name | Необов'язково Рядок | - |
| title | Необов'язково Рядок | - |
| description | Необов'язково Рядок | - |
| url | Необов'язково Рядок | - |
| image | Необов'язково Файл | - |
| button_title_1 | Необов'язково Рядок | - |
| button_url_1 | Необов'язково Рядок | - |
| button_title_2 | Необов'язково Рядок | - |
| button_url_2 | Необов'язково Рядок | - |
| is_scheduled | Необов'язково Булевий | - |
| scheduled_datetime | Необов'язково Рядок | - |
| is_silent | Необов'язково Булевий | - |
| is_auto_hide | Необов'язково Булевий | - |
| ttl | Необов'язково Рядок | Дозволені значення: 0 , 900 , 1800 , 3600 , 10800 , 21600 , 43200 , 86400 , 259200 , 432000 , 604800 , 1209600 , 2419200 |
| segment | Необов'язково Рядок | Дозволені значення: all , custom , filter , INT segment_id |
| subscribers_ids | Необов'язково Рядок | Доступно, коли: segment = custom |
| filters_custom_parameter_key[index] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_custom_parameter_condition[index] | Необов'язково Рядок |
Дозволені значення: exact, not_exact, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, bigger_than, lower_than Доступно, коли: segment = filter |
| filters_custom_parameter_value[index] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_subscribed_on_url | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_cities | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_countries[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_continents[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_device_type[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_languages[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_operating_systems[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| filters_browsers[] | Необов'язково Рядок | Доступно, коли: segment = filter |
| utm_source | Необов'язково Рядок | - |
| utm_medium | Необов'язково Рядок | - |
| utm_campaign | Необов'язково Рядок | - |
| save | Необов'язково Булевий | Зберегти чернетку |
| send | Необов'язково Булевий | Надіслати кампанію |
curl --request POST \
--url 'https://pusher.cv/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'website_id=1' \
--form 'title=Example title' \
--form 'description=Example description' \
--url 'https://pusher.cv/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'website_id=1' \
--form 'title=Example title' \
--form 'description=Example description' \
{
"data": {
"id": 1
}
}
DELETE https://pusher.cv/api/campaigns/{campaign_id}
curl --request DELETE \
--url 'https://pusher.cv/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pusher.cv/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \