مدیران اعلانها
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}' \
پارامترها | جزئیات | توضیحات |
---|---|---|
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": "2025-10-16 11:13:48", } ], "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": "2025-10-16 11:13:48", } }
POST https://tistos.com/api/notification-handlers
پارامترها | جزئیات | توضیحات |
---|---|---|
name | ضروری رشته | - |
type | ضروری رشته | مقادیر مجاز: email , webhook , slack , discord , telegram , microsoft_teams |
اختیاری رشته | قابل دسترس هنگام: type = email ایمیل | |
webhook | اختیاری رشته | قابل دسترس هنگام: type = webhook آدرس URL وبهوک |
slack | اختیاری رشته | قابل دسترس هنگام: type = slack آدرس URL وبهوک Slack |
discord | اختیاری رشته | قابل دسترس هنگام: type = discord آدرس URL وبهوک Discord |
telegram | اختیاری رشته | قابل دسترس هنگام: type = telegram توکن API تلگرام |
telegram_chat_id | اختیاری رشته | قابل دسترس هنگام: type = telegram شناسه چت تلگرام |
microsoft_teams | اختیاری رشته | قابل دسترس هنگام: type = microsoft_teams آدرس URL وبهوک Microsoft Teams |
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 |
اختیاری رشته | قابل دسترس هنگام: type = email ایمیل | |
webhook | اختیاری رشته | قابل دسترس هنگام: type = webhook آدرس URL وبهوک |
slack | اختیاری رشته | قابل دسترس هنگام: type = slack آدرس URL وبهوک Slack |
discord | اختیاری رشته | قابل دسترس هنگام: type = discord آدرس URL وبهوک Discord |
telegram | اختیاری رشته | قابل دسترس هنگام: type = telegram توکن API تلگرام |
telegram_chat_id | اختیاری رشته | قابل دسترس هنگام: type = telegram شناسه چت تلگرام |
microsoft_teams | اختیاری رشته | قابل دسترس هنگام: type = microsoft_teams آدرس URL وبهوک Microsoft Teams |
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}' \