Warning: Undefined property: stdClass::$auto_currency_detection in /home/pushhub/public_html/app/core/App.php on line 117 Подписчики  – документация по API - PushHub

Подписчики

GET https://pushhub.ru/api/subscribers/
curl --request GET \
--url 'https://pushhub.ru/api/subscribers/' \
--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,
            "unique_endpoint_id": "20cdca6b287865a34365f8df7f0d57af",
            "endpoint": null,
            "ip": "**.***.***.*",
            "custom_parameters": [],
            "city_name": "Bucharest",
            "country_code": "RO",
            "continent_code": "EU",
            "os_name": "OS X",
            "browser_name": "Chrome",
            "browser_language": "en",
            "device_type": "desktop",
            "subscribed_on_url": "https://example.com/page",
            "total_sent_push_notifications": 1,
            "total_displayed_push_notifications": 1,
            "total_clicked_push_notifications": 1,
            "total_closed_push_notifications": 0,
            "last_sent_datetime": "2024-08-03 19:27:34",
            "last_datetime": null,
            "datetime": "2026-03-04 23:25:02",
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://pushhub.ru/api/subscribers?page=1",
        "last": "https://pushhub.ru/api/subscribers?page=1",
        "next": null,
        "prev": null,
        "self": "https://pushhub.ru/api/subscribers?page=1"
    }
}
GET https://pushhub.ru/api/subscribers/{subscriber_id}
curl --request GET \
--url 'https://pushhub.ru/api/subscribers/{subscriber_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "user_id": 1,
        "website_id": 1,
        "unique_endpoint_id": "20cdca6b287865a34365f8df7f0d57af",
        "endpoint": null,
        "ip": "**.***.***.*",
        "custom_parameters": [],
        "city_name": "Bucharest",
        "country_code": "RO",
        "continent_code": "EU",
        "os_name": "OS X",
        "browser_name": "Chrome",
        "browser_language": "en",
        "device_type": "desktop",
        "subscribed_on_url": "https://example.com/page",
        "total_sent_push_notifications": 1,
        "total_displayed_push_notifications": 1,
        "total_clicked_push_notifications": 1,
        "total_closed_push_notifications": 0,
        "last_sent_datetime": "2024-08-03 19:27:34",
        "last_datetime": null,
        "datetime": "2026-03-04 23:25:02",
    }
}
POST https://pushhub.ru/api/subscribers/{subscriber_id}
Параметры Подробности Описание
custom_parameter_key[index] Необязательный Строка -
custom_parameter_value[index] Необязательный Строка -
curl --request POST \
--url 'https://pushhub.ru/api/subscribers/{subscriber_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'custom_parameter_key[0]=name' \
--form 'custom_parameter_value[0]=john@example.com' \
{
    "data": {
        "id": 1
    }
}
DELETE https://pushhub.ru/api/subscribers/{subscriber_id}
curl --request DELETE \
--url 'https://pushhub.ru/api/subscribers/{subscriber_id}' \
--header 'Authorization: Bearer {api_key}' \