Jako zarząd CNHosted Przepraszamy za obecne natarczywe reklamy, jak tylko adsense zaakceptuje projekt wymienmy na lepszego dostawcę. Obecnie zakup pakiet freemium lub naciśnij 2 razy aby obejść reklamę.

Powiadomienia

GET https://cnhosted.com/api/notification-handlers/
curl --request GET \
--url 'https://cnhosted.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
Parametry Szczegóły Opis
page Opcjonalne Integer Numer strony, z którego chcesz uzyskać wyniki. Domyślnie 1.
results_per_page Opcjonalne Integer Ile wyników chcesz na stronę. Dozwolone wartości to: 10 , 25 , 50 , 100 , 250 , 500 , 1000. Domyślnie 25.
{ "data": [ { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "[email protected]" }, "is_enabled": true, "last_datetime": null, "datetime": "2025-06-12 17:09:50" } ], "meta": { "page": 1, "results_per_page": 25, "total": 1, "total_pages": 1 }, "links": { "first": "https://cnhosted.com/api/notification-handlers?&page=1", "last": "https://cnhosted.com/api/notification-handlers?&page=1", "next": null, "prev": null, "self": "https://cnhosted.com/api/notification-handlers?&page=1" } }
GET https://cnhosted.com/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://cnhosted.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
{ "data": { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "[email protected]" }, "is_enabled": true, "last_datetime": null, "datetime": "2025-06-12 17:09:50" } }
POST https://cnhosted.com/api/notification-handlers
Parametry Szczegóły Opis
name Wymagane String -
type Wymagane String Dozwolone wartości: email , webhook , slack , discord , telegram , microsoft_teams , x , push_subscriber_id
email Opcjonalne String Dozwolone kiedy; type = email Email
webhook Opcjonalne String Dozwolone kiedy; type = webhook Webhook URL
slack Opcjonalne String Dozwolone kiedy; type = slack Slack webhook URL
discord Opcjonalne String Dozwolone kiedy; type = discord Discord webhook URL
telegram Opcjonalne String Dozwolone kiedy; type = telegram Telegram API Token
telegram_chat_id Opcjonalne String Dozwolone kiedy; type = telegram Telegram Chat ID
x_consumer_key Opcjonalne String Dozwolone kiedy; type = x Telegram API Token
x_consumer_secret Opcjonalne String Dozwolone kiedy; type = x Telegram API Token
x_access_token Opcjonalne String Dozwolone kiedy; type = x Telegram API Token
x_access_token_secret Opcjonalne String Dozwolone kiedy; type = x Telegram API Token
curl --request POST \
--url 'https://cnhosted.com/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=[email protected]' \
{ "data": { "id": 1 } }
POST https://cnhosted.com/api/notification-handlers/{notification_handler_id}
Parametry Szczegóły Opis
name Opcjonalne String -
type Opcjonalne String Dozwolone wartości: email , webhook , slack , discord , telegram , microsoft_teams , x , push_subscriber_id
email Opcjonalne String Dozwolone kiedy; type = email Email
webhook Opcjonalne String Dozwolone kiedy; type = webhook Webhook URL
slack Opcjonalne String Dozwolone kiedy; type = slack Slack webhook URL
discord Opcjonalne String Dozwolone kiedy; type = discord Discord webhook URL
telegram Opcjonalne String Dozwolone kiedy; type = telegram Telegram API Token
telegram_chat_id Opcjonalne String Dozwolone kiedy; type = telegram Telegram Chat ID
x_consumer_key Opcjonalne String Dozwolone kiedy; type = x Telegram API Token
x_consumer_secret Opcjonalne String Dozwolone kiedy; type = x Telegram API Token
x_access_token Opcjonalne String Dozwolone kiedy; type = x Telegram API Token
x_access_token_secret Opcjonalne String Dozwolone kiedy; type = x Telegram API Token
is_enabled Opcjonalne Boolean -
curl --request POST \
--url 'https://cnhosted.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example new name' \
--form 'is_enabled=1' \
{ "data": { "id": 1 } }
DELETE https://cnhosted.com/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://cnhosted.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \