Notification handlers
GET https://1rl.io/api/notification-handlers/
curl --request GET \
--url 'https://1rl.io/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://1rl.io/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
พารามิเตอร์ | รายละเอียด | คำอธิบาย |
---|---|---|
page | ไม่บังคับ จำนวนเต็ม | หมายเลขหน้าที่คุณต้องการผลลัพธ์จาก ค่าเริ่มต้นคือ 1 . |
results_per_page | ไม่บังคับ จำนวนเต็ม | คุณต้องการผลลัพธ์กี่รายการต่อหน้า ค่าที่อนุญาตคือ: 10 , 25 , 50 , 100 , 250 , 500 , 1000 ค่าเริ่มต้นคือ 25 . |
{ "data": [ { "id": 1, "type": "email", "name": "Work email", "settings": { "email": "hey@example.com" }, "is_enabled": true, "last_datetime": null, "datetime": "2025-10-14 00:31:51", } ], "meta": { "page": 1, "results_per_page": 25, "total": 1, "total_pages": 1 }, "links": { "first": "https://1rl.io/api/notification-handlers?page=1", "last": "https://1rl.io/api/notification-handlers?page=1", "next": null, "prev": null, "self": "https://1rl.io/api/notification-handlers?page=1" } }
GET https://1rl.io/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://1rl.io/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://1rl.io/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-10-14 00:31:51", } }
POST https://1rl.io/api/notification-handlers
พารามิเตอร์ | รายละเอียด | คำอธิบาย |
---|---|---|
name | จำเป็น สตริง | - |
type | จำเป็น สตริง | ค่าที่อนุญาต: email , webhook , slack , discord , telegram , microsoft_teams |
ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = email Email | |
webhook | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = webhook Webhook URL |
slack | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = slack Slack webhook URL |
discord | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = discord Discord webhook URL |
telegram | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = telegram Telegram API Token |
telegram_chat_id | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = telegram Telegram Chat ID |
microsoft_teams | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = microsoft_teams Microsoft Teams webhook URL |
curl --request POST \
--url 'https://1rl.io/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://1rl.io/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://1rl.io/api/notification-handlers/{notification_handler_id}
พารามิเตอร์ | รายละเอียด | คำอธิบาย |
---|---|---|
name | ไม่บังคับ สตริง | - |
type | ไม่บังคับ สตริง | ค่าที่อนุญาต: email , webhook , slack , discord , telegram , microsoft_teams |
ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = email Email | |
webhook | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = webhook Webhook URL |
slack | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = slack Slack webhook URL |
discord | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = discord Discord webhook URL |
telegram | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = telegram Telegram API Token |
telegram_chat_id | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = telegram Telegram Chat ID |
microsoft_teams | ไม่บังคับ สตริง | มีให้บริการเมื่อ: type = microsoft_teams Microsoft Teams webhook URL |
is_enabled | ไม่บังคับ บูลีน | - |
curl --request POST \
--url 'https://1rl.io/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://1rl.io/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://1rl.io/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://1rl.io/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://1rl.io/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \