Obsługa powiadomień
GET https://pusher.lt/api/notification-handlers/
curl --request GET \
--url 'https://pusher.lt/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pusher.lt/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
Parametry | Szczegóły | Opis |
---|---|---|
page | Opcjonalny Liczba całkowita | Numer strony, z której chcesz uzyskać wyniki. Domyślnie 1 . |
results_per_page | Opcjonalny Liczba całkowita | 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": "hey@example.com"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-07-01 10:57:41"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://pusher.lt/api/notification-handlers?&page=1",
"last": "https://pusher.lt/api/notification-handlers?&page=1",
"next": null,
"prev": null,
"self": "https://pusher.lt/api/notification-handlers?&page=1"
}
}
GET https://pusher.lt/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://pusher.lt/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pusher.lt/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"type": "email",
"name": "Work email",
"settings": {
"email": "hey@example.com"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-07-01 10:57:41"
}
}
POST https://pusher.lt/api/notification-handlers
Parametry | Szczegóły | Opis |
---|---|---|
name | Wymagane Ciąg | - |
type | Wymagane Ciąg | Dozwolone wartości: email , webhook , slack , discord , telegram , microsoft_teams , google_chat , internal_notification |
Opcjonalny Ciąg | Dostępne kiedy: type = email Email | |
webhook | Opcjonalny Ciąg | Dostępne kiedy: type = webhook Adres URL webhooka |
slack | Opcjonalny Ciąg | Dostępne kiedy: type = slack Adres URL webhooka Slacka |
discord | Opcjonalny Ciąg | Dostępne kiedy: type = discord Adres URL webhooka Discord |
telegram | Opcjonalny Ciąg | Dostępne kiedy: type = telegram Token API Telegrama |
telegram_chat_id | Opcjonalny Ciąg | Dostępne kiedy: type = telegram ID czatu Telegram |
x_consumer_key | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegrama |
x_consumer_secret | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegrama |
x_access_token | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegrama |
x_access_token_secret | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegrama |
curl --request POST \
--url 'https://pusher.lt/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=hello@example.com' \
--url 'https://pusher.lt/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=hello@example.com' \
{
"data": {
"id": 1
}
}
POST https://pusher.lt/api/notification-handlers/{notification_handler_id}
Parametry | Szczegóły | Opis |
---|---|---|
name | Opcjonalny Ciąg | - |
type | Opcjonalny Ciąg | Dozwolone wartości: email , webhook , slack , discord , telegram , microsoft_teams , google_chat , internal_notification |
Opcjonalny Ciąg | Dostępne kiedy: type = email Email | |
webhook | Opcjonalny Ciąg | Dostępne kiedy: type = webhook Adres URL webhooka |
slack | Opcjonalny Ciąg | Dostępne kiedy: type = slack Adres URL webhooka Slacka |
discord | Opcjonalny Ciąg | Dostępne kiedy: type = discord Adres URL webhooka Discord |
telegram | Opcjonalny Ciąg | Dostępne kiedy: type = telegram Token API Telegrama |
telegram_chat_id | Opcjonalny Ciąg | Dostępne kiedy: type = telegram ID czatu Telegram |
x_consumer_key | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegrama |
x_consumer_secret | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegrama |
x_access_token | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegrama |
x_access_token_secret | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegrama |
is_enabled | Opcjonalny Logiczny | - |
curl --request POST \
--url 'https://pusher.lt/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' \
--url 'https://pusher.lt/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://pusher.lt/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://pusher.lt/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pusher.lt/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \