Notification handlers
GET https://popupke.com/api/notification-handlers/
curl --request GET \
--url 'https://popupke.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://popupke.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
매개변수 | 세부 | 설명 |
---|---|---|
page | 선택 과목 정수 | The page number that you want results from. Defaults to 1 . |
results_per_page | 선택 과목 정수 | How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Defaults to 25 . |
{
"data": [
{
"id": 1,
"type": "email",
"name": "Work email",
"settings": {
"email": "hey@example.com"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2021-06-27 22:16:23"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://popupke.com/api/notification-handlers?&page=1",
"last": "https://popupke.com/api/notification-handlers?&page=1",
"next": null,
"prev": null,
"self": "https://popupke.com/api/notification-handlers?&page=1"
}
}
GET https://popupke.com/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://popupke.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://popupke.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": "2021-06-27 22:16:23"
}
}
POST https://popupke.com/api/notification-handlers
매개변수 | 세부 | 설명 |
---|---|---|
name | 필수의 끈 | - |
type | 필수의 끈 | Allowed values: email , webhook , slack , discord , telegram , microsoft_teams , x , push_subscriber_id |
선택 과목 끈 | Available when: type = email Email | |
webhook | 선택 과목 끈 | Available when: type = webhook Webhook URL |
slack | 선택 과목 끈 | Available when: type = slack Slack webhook URL |
discord | 선택 과목 끈 | Available when: type = discord Discord webhook URL |
telegram | 선택 과목 끈 | Available when: type = telegram Telegram API Token |
telegram_chat_id | 선택 과목 끈 | Available when: type = telegram Telegram Chat ID |
x_consumer_key | 선택 과목 끈 | Available when: type = x Telegram API Token |
x_consumer_secret | 선택 과목 끈 | Available when: type = x Telegram API Token |
x_access_token | 선택 과목 끈 | Available when: type = x Telegram API Token |
x_access_token_secret | 선택 과목 끈 | Available when: type = x Telegram API Token |
curl --request POST \
--url 'https://popupke.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://popupke.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://popupke.com/api/notification-handlers/{notification_handler_id}
매개변수 | 세부 | 설명 |
---|---|---|
name | 선택 과목 끈 | - |
type | 선택 과목 끈 | Allowed values: email , webhook , slack , discord , telegram , microsoft_teams , x , push_subscriber_id |
선택 과목 끈 | Available when: type = email Email | |
webhook | 선택 과목 끈 | Available when: type = webhook Webhook URL |
slack | 선택 과목 끈 | Available when: type = slack Slack webhook URL |
discord | 선택 과목 끈 | Available when: type = discord Discord webhook URL |
telegram | 선택 과목 끈 | Available when: type = telegram Telegram API Token |
telegram_chat_id | 선택 과목 끈 | Available when: type = telegram Telegram Chat ID |
x_consumer_key | 선택 과목 끈 | Available when: type = x Telegram API Token |
x_consumer_secret | 선택 과목 끈 | Available when: type = x Telegram API Token |
x_access_token | 선택 과목 끈 | Available when: type = x Telegram API Token |
x_access_token_secret | 선택 과목 끈 | Available when: type = x Telegram API Token |
is_enabled | 선택 과목 부울 | - |
curl --request POST \
--url 'https://popupke.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://popupke.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://popupke.com/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://popupke.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://popupke.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \