Obsługa powiadomień
GET https://pushye.com/api/notification-handlers/
curl --request GET \
--url 'https://pushye.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pushye.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
Parametry | Szczegóły | Opis |
---|---|---|
page | Opcjonalny Całkowity | Numer strony, z której chcesz uzyskać wyniki. Domyślnie 1 . |
results_per_page | Opcjonalny Całkowity | 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-02-05 15:00:00"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://pushye.com/api/notification-handlers?&page=1",
"last": "https://pushye.com/api/notification-handlers?&page=1",
"next": null,
"prev": null,
"self": "https://pushye.com/api/notification-handlers?&page=1"
}
}
GET https://pushye.com/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://pushye.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pushye.com/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-02-05 15:00:00"
}
}
POST https://pushye.com/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 , twilio , twilio_call , whatsapp , x , push_subscriber_id |
Opcjonalny Ciąg | Dostępne kiedy: type = email Email | |
webhook | Opcjonalny Ciąg | Dostępne kiedy: type = webhook URL webhooka |
slack | Opcjonalny Ciąg | Dostępne kiedy: type = slack URL webhook Slack |
discord | Opcjonalny Ciąg | Dostępne kiedy: type = discord URL webhook Discorda |
telegram | Opcjonalny Ciąg | Dostępne kiedy: type = telegram Token API Telegram |
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 Telegram |
x_consumer_secret | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegram |
x_access_token | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegram |
x_access_token_secret | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegram |
twilio | Opcjonalny Ciąg | Dostępne kiedy: type = twilio Numer telefonu |
twilio_call | Opcjonalny Ciąg | Dostępne kiedy: type = twilio_call Numer telefonu |
Opcjonalny Ciąg | Dostępne kiedy: type = whatsapp Numer telefonu |
curl --request POST \
--url 'https://pushye.com/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://pushye.com/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://pushye.com/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 , twilio , twilio_call , whatsapp , x , push_subscriber_id |
Opcjonalny Ciąg | Dostępne kiedy: type = email Email | |
webhook | Opcjonalny Ciąg | Dostępne kiedy: type = webhook URL webhooka |
slack | Opcjonalny Ciąg | Dostępne kiedy: type = slack URL webhook Slack |
discord | Opcjonalny Ciąg | Dostępne kiedy: type = discord URL webhook Discorda |
telegram | Opcjonalny Ciąg | Dostępne kiedy: type = telegram Token API Telegram |
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 Telegram |
x_consumer_secret | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegram |
x_access_token | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegram |
x_access_token_secret | Opcjonalny Ciąg | Dostępne kiedy: type = x Token API Telegram |
twilio | Opcjonalny Ciąg | Dostępne kiedy: type = twilio Numer telefonu |
twilio_call | Opcjonalny Ciąg | Dostępne kiedy: type = twilio_call Numer telefonu |
Opcjonalny Ciąg | Dostępne kiedy: type = whatsapp Numer telefonu | |
is_enabled | Opcjonalny Boolean | - |
curl --request POST \
--url 'https://pushye.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' \
--url 'https://pushye.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://pushye.com/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://pushye.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://pushye.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \