مدیریتکنندههای اعلان
GET https://uptimeiran.com/api/notification-handlers/
curl --request GET \
--url 'https://uptimeiran.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptimeiran.com/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
| پارامترها | جزئیات | توضیحات |
|---|---|---|
| page | اختیاری عدد صحیح (Integer) | شماره صفحهای که میخواهید نتایج را از آن دریافت کنید. پیشفرض 1 است. |
| results_per_page | اختیاری عدد صحیح (Integer) | تعداد نتایجی که در هر صفحه میخواهید. مقادیر مجاز: 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": "2026-03-02 10:24:49"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://uptimeiran.com/api/notification-handlers?&page=1",
"last": "https://uptimeiran.com/api/notification-handlers?&page=1",
"next": null,
"prev": null,
"self": "https://uptimeiran.com/api/notification-handlers?&page=1"
}
}
GET https://uptimeiran.com/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://uptimeiran.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptimeiran.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": "2026-03-02 10:24:49"
}
}
POST https://uptimeiran.com/api/notification-handlers
| پارامترها | جزئیات | توضیحات |
|---|---|---|
| name | الزامی رشته (String) | - |
| type | الزامی رشته (String) | مقادیر مجاز: email , mobile , webhook , slack , discord , telegram , microsoft_teams , x , google_chat , internal_notification |
| اختیاری رشته (String) | در دسترس زمانی که: type = email ایمیل | |
| webhook | اختیاری رشته (String) | در دسترس زمانی که: type = webhook آدرس وبهوک (URL) |
| slack | اختیاری رشته (String) | در دسترس زمانی که: type = slack آدرس وبهوک اسلک |
| discord | اختیاری رشته (String) | در دسترس زمانی که: type = discord آدرس وبهوک دیسکورد |
| telegram | اختیاری رشته (String) | در دسترس زمانی که: type = telegram توکن API تلگرام |
| telegram_chat_id | اختیاری رشته (String) | در دسترس زمانی که: type = telegram شناسه چت تلگرام |
| x_consumer_key | اختیاری رشته (String) | در دسترس زمانی که: type = x توکن API تلگرام |
| x_consumer_secret | اختیاری رشته (String) | در دسترس زمانی که: type = x توکن API تلگرام |
| x_access_token | اختیاری رشته (String) | در دسترس زمانی که: type = x توکن API تلگرام |
| x_access_token_secret | اختیاری رشته (String) | در دسترس زمانی که: type = x توکن API تلگرام |
curl --request POST \
--url 'https://uptimeiran.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://uptimeiran.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://uptimeiran.com/api/notification-handlers/{notification_handler_id}
| پارامترها | جزئیات | توضیحات |
|---|---|---|
| name | اختیاری رشته (String) | - |
| type | اختیاری رشته (String) | مقادیر مجاز: email , mobile , webhook , slack , discord , telegram , microsoft_teams , x , google_chat , internal_notification |
| اختیاری رشته (String) | در دسترس زمانی که: type = email ایمیل | |
| webhook | اختیاری رشته (String) | در دسترس زمانی که: type = webhook آدرس وبهوک (URL) |
| slack | اختیاری رشته (String) | در دسترس زمانی که: type = slack آدرس وبهوک اسلک |
| discord | اختیاری رشته (String) | در دسترس زمانی که: type = discord آدرس وبهوک دیسکورد |
| telegram | اختیاری رشته (String) | در دسترس زمانی که: type = telegram توکن API تلگرام |
| telegram_chat_id | اختیاری رشته (String) | در دسترس زمانی که: type = telegram شناسه چت تلگرام |
| x_consumer_key | اختیاری رشته (String) | در دسترس زمانی که: type = x توکن API تلگرام |
| x_consumer_secret | اختیاری رشته (String) | در دسترس زمانی که: type = x توکن API تلگرام |
| x_access_token | اختیاری رشته (String) | در دسترس زمانی که: type = x توکن API تلگرام |
| x_access_token_secret | اختیاری رشته (String) | در دسترس زمانی که: type = x توکن API تلگرام |
| is_enabled | اختیاری بولی (Boolean) | - |
curl --request POST \
--url 'https://uptimeiran.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://uptimeiran.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://uptimeiran.com/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://uptimeiran.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://uptimeiran.com/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \