مدیریت اعلانها
GET https://98cloud.ir/api/notification-handlers/
curl --request GET \
--url 'https://98cloud.ir/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://98cloud.ir/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 13:57:47"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://98cloud.ir/api/notification-handlers?&page=1",
"last": "https://98cloud.ir/api/notification-handlers?&page=1",
"next": null,
"prev": null,
"self": "https://98cloud.ir/api/notification-handlers?&page=1"
}
}
GET https://98cloud.ir/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://98cloud.ir/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://98cloud.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-10-14 13:57:47"
}
}
POST https://98cloud.ir/api/notification-handlers
پارامترها | جزئیات | توضیحات |
---|---|---|
name | الزامی رشته | - |
type | الزامی رشته | مقادیر مجاز: email , webhook , slack , discord , telegram , microsoft_teams |
اختیاری رشته | در دسترس وقتی: type = email ایمیل | |
webhook | اختیاری رشته | در دسترس وقتی: type = webhook URL وبهوک |
slack | اختیاری رشته | در دسترس وقتی: type = slack URL وبهوک اسلک |
discord | اختیاری رشته | در دسترس وقتی: type = discord URL وبهوک دیسکورد |
telegram | اختیاری رشته | در دسترس وقتی: type = telegram توکن API تلگرام |
telegram_chat_id | اختیاری رشته | در دسترس وقتی: type = telegram شناسه چت تلگرام |
x_consumer_key | اختیاری رشته | در دسترس وقتی: type = x توکن API تلگرام |
x_consumer_secret | اختیاری رشته | در دسترس وقتی: type = x توکن API تلگرام |
x_access_token | اختیاری رشته | در دسترس وقتی: type = x توکن API تلگرام |
x_access_token_secret | اختیاری رشته | در دسترس وقتی: type = x توکن API تلگرام |
curl --request POST \
--url 'https://98cloud.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://98cloud.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://98cloud.ir/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 وبهوک اسلک |
discord | اختیاری رشته | در دسترس وقتی: type = discord URL وبهوک دیسکورد |
telegram | اختیاری رشته | در دسترس وقتی: type = telegram توکن API تلگرام |
telegram_chat_id | اختیاری رشته | در دسترس وقتی: type = telegram شناسه چت تلگرام |
x_consumer_key | اختیاری رشته | در دسترس وقتی: type = x توکن API تلگرام |
x_consumer_secret | اختیاری رشته | در دسترس وقتی: type = x توکن API تلگرام |
x_access_token | اختیاری رشته | در دسترس وقتی: type = x توکن API تلگرام |
x_access_token_secret | اختیاری رشته | در دسترس وقتی: type = x توکن API تلگرام |
is_enabled | اختیاری بولین | - |
curl --request POST \
--url 'https://98cloud.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://98cloud.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://98cloud.ir/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://98cloud.ir/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://98cloud.ir/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \