Notification handlers
GET https://url20.ir/api/notification-handlers/
curl --request GET \
--url 'https://url20.ir/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://url20.ir/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
| پارامترها | Details | Description |
|---|---|---|
| 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-11-19 11:37:50",
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://url20.ir/api/notification-handlers?page=1",
"last": "https://url20.ir/api/notification-handlers?page=1",
"next": null,
"prev": null,
"self": "https://url20.ir/api/notification-handlers?page=1"
}
}
GET https://url20.ir/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://url20.ir/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://url20.ir/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-11-19 11:37:50",
}
}
POST https://url20.ir/api/notification-handlers
| پارامترها | Details | Description |
|---|---|---|
| name | ضروری رشته | - |
| type | ضروری رشته | مقادیر مجاز: email , webhook , slack , discord , telegram , microsoft_teams |
| اختیاری رشته | 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 |
| microsoft_teams | اختیاری رشته | Available when: type = microsoft_teams Microsoft Teams webhook URL |
curl --request POST \
--url 'https://url20.ir/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://url20.ir/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://url20.ir/api/notification-handlers/{notification_handler_id}
| پارامترها | Details | Description |
|---|---|---|
| name | اختیاری رشته | - |
| type | اختیاری رشته | مقادیر مجاز: email , webhook , slack , discord , telegram , microsoft_teams |
| اختیاری رشته | 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 |
| microsoft_teams | اختیاری رشته | Available when: type = microsoft_teams Microsoft Teams webhook URL |
| is_enabled | اختیاری بولی | - |
curl --request POST \
--url 'https://url20.ir/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://url20.ir/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://url20.ir/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://url20.ir/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://url20.ir/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \