ตัวจัดการการแจ้งเตือน
GET https://tistos.com/api/notification-handlers/
curl --request GET \
--url 'https://tistos.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://tistos.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
| พารามิเตอร์ | รายละเอียด | คำอธิบาย |
|---|---|---|
| search | ทางเลือก สตริง | สตริงการค้นหา |
| search_by | ทางเลือก สตริง | คุณกำลังค้นหาด้วยฟิลด์ใด ค่าอนุญาตคือ: name. |
| is_enabled | ทางเลือก บูลีน | |
| type | ทางเลือก สตริง | คุณกำลังค้นหาด้วยฟิลด์ใด ค่าอนุญาตคือ: email, webhook, slack, discord, telegram, microsoft_teams, x, google_chat. |
| datetime_field | ทางเลือก สตริง | ค่าที่อนุญาต: datetime, last_datetime |
| datetime_start | ทางเลือก สตริง | กรองผลลัพธ์เริ่มต้นจากวันที่และเวลานี้ รูปแบบ Y-m-d H:i:s |
| datetime_end | ทางเลือก สตริง | กรองผลลัพธ์จนถึงวันที่และเวลานี้ รูปแบบ Y-m-d H:i:s |
| order_by | ทางเลือก สตริง | ฟิลด์ใดที่ต้องการเรียงลำดับผลลัพธ์ ค่าอนุญาตคือ: notification_handler_id, datetime, last_datetime, name. |
| order_type | ทางเลือก สตริง | การจัดเรียงผลลัพธ์ ค่าที่อนุญาตคือ: ASC สำหรับการจัดเรียงจากน้อยไปมาก และ DESC สำหรับการจัดเรียงจากมากไปน้อย |
| search | ทางเลือก สตริง | สตริงการค้นหา |
| search_by | ทางเลือก สตริง | คุณกำลังค้นหาด้วยฟิลด์ใด ค่าอนุญาตคือ: name. |
| is_enabled | ทางเลือก บูลีน | |
| type | ทางเลือก สตริง | คุณกำลังค้นหาด้วยฟิลด์ใด ค่าอนุญาตคือ: email, webhook, slack, discord, telegram, microsoft_teams, x, google_chat. |
| datetime_field | ทางเลือก สตริง | ค่าที่อนุญาต: datetime, last_datetime |
| datetime_start | ทางเลือก สตริง | กรองผลลัพธ์เริ่มต้นจากวันที่และเวลานี้ รูปแบบ Y-m-d H:i:s |
| datetime_end | ทางเลือก สตริง | กรองผลลัพธ์จนถึงวันที่และเวลานี้ รูปแบบ Y-m-d H:i:s |
| order_by | ทางเลือก สตริง | ฟิลด์ใดที่ต้องการเรียงลำดับผลลัพธ์ ค่าอนุญาตคือ: notification_handler_id, datetime, last_datetime, name. |
| order_type | ทางเลือก สตริง | การจัดเรียงผลลัพธ์ ค่าที่อนุญาตคือ: ASC สำหรับการจัดเรียงจากน้อยไปมาก และ DESC สำหรับการจัดเรียงจากมากไปน้อย |
| page | ทางเลือก จำนวนเต็ม | หมายเลขหน้าที่คุณต้องการผลลัพธ์จาก ค่าเริ่มต้นคือ 1. |
| results_per_page | ทางเลือก จำนวนเต็ม | คุณต้องการผลลัพธ์กี่รายการต่อหน้า ค่าที่อนุญาตคือ: 10, 25, 50, 100, 250, 500, 1000 ค่าเริ่มต้นคือ 25. |
{
"data": [
{
"id": 1,
"type": "email",
"name": "Work email",
"settings": {
"email": "[email protected]"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2026-07-18 12:44:44",
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://tistos.com/api/notification-handlers?page=1",
"last": "https://tistos.com/api/notification-handlers?page=1",
"next": null,
"prev": null,
"self": "https://tistos.com/api/notification-handlers?page=1"
}
}
GET https://tistos.com/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://tistos.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://tistos.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": "2026-07-18 12:44:44",
}
}
POST https://tistos.com/api/notification-handlers
| พารามิเตอร์ | รายละเอียด | คำอธิบาย |
|---|---|---|
| name | จำเป็น สตริง | - |
| type | จำเป็น สตริง | ค่าที่อนุญาต: email, webhook, slack, discord, telegram, microsoft_teams, x, google_chat |
| ทางเลือก สตริง | มีให้บริการเมื่อ: type = email อีเมล | |
| webhook | ทางเลือก สตริง | มีให้บริการเมื่อ: type = webhook URL ของ webhook |
| slack | ทางเลือก สตริง | มีให้บริการเมื่อ: type = slack URL ของ Slack webhook |
| discord | ทางเลือก สตริง | มีให้บริการเมื่อ: type = discord URL ของ Discord webhook |
| telegram | ทางเลือก สตริง | มีให้บริการเมื่อ: type = telegram โทเค็น API ของ Telegram |
| telegram_chat_id | ทางเลือก สตริง | มีให้บริการเมื่อ: type = telegram รหัสแชท Telegram |
| microsoft_teams | ทางเลือก สตริง | มีให้บริการเมื่อ: type = microsoft_teams URL ของ Microsoft Teams webhook |
| google_chat | ทางเลือก สตริง | มีให้บริการเมื่อ: type = google_chat URL webhook ของ Google Chat |
| x_consumer_key | ทางเลือก สตริง | มีให้บริการเมื่อ: type = x โทเค็น API ของ Telegram |
| x_consumer_secret | ทางเลือก สตริง | มีให้บริการเมื่อ: type = x โทเค็น API ของ Telegram |
| x_access_token | ทางเลือก สตริง | มีให้บริการเมื่อ: type = x โทเค็น API ของ Telegram |
| x_access_token_secret | ทางเลือก สตริง | มีให้บริการเมื่อ: type = x โทเค็น API ของ Telegram |
curl --request POST \
--url 'https://tistos.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]' \
--url 'https://tistos.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://tistos.com/api/notification-handlers/{notification_handler_id}
| พารามิเตอร์ | รายละเอียด | คำอธิบาย |
|---|---|---|
| name | ทางเลือก สตริง | - |
| type | ทางเลือก สตริง | ค่าที่อนุญาต: email, webhook, slack, discord, telegram, microsoft_teams, x, google_chat |
| ทางเลือก สตริง | มีให้บริการเมื่อ: type = email อีเมล | |
| webhook | ทางเลือก สตริง | มีให้บริการเมื่อ: type = webhook URL ของ webhook |
| slack | ทางเลือก สตริง | มีให้บริการเมื่อ: type = slack URL ของ Slack webhook |
| discord | ทางเลือก สตริง | มีให้บริการเมื่อ: type = discord URL ของ Discord webhook |
| telegram | ทางเลือก สตริง | มีให้บริการเมื่อ: type = telegram โทเค็น API ของ Telegram |
| telegram_chat_id | ทางเลือก สตริง | มีให้บริการเมื่อ: type = telegram รหัสแชท Telegram |
| microsoft_teams | ทางเลือก สตริง | มีให้บริการเมื่อ: type = microsoft_teams URL ของ Microsoft Teams webhook |
| google_chat | ทางเลือก สตริง | มีให้บริการเมื่อ: type = google_chat URL webhook ของ Google Chat |
| x_consumer_key | ทางเลือก สตริง | มีให้บริการเมื่อ: type = x โทเค็น API ของ Telegram |
| x_consumer_secret | ทางเลือก สตริง | มีให้บริการเมื่อ: type = x โทเค็น API ของ Telegram |
| x_access_token | ทางเลือก สตริง | มีให้บริการเมื่อ: type = x โทเค็น API ของ Telegram |
| x_access_token_secret | ทางเลือก สตริง | มีให้บริการเมื่อ: type = x โทเค็น API ของ Telegram |
| is_enabled | ทางเลือก บูลีน | - |
curl --request POST \
--url 'https://tistos.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://tistos.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://tistos.com/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://tistos.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://tistos.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \