Create a monitoring notification
Name | Data Type | Status | Description |
auth-id or sub-auth-id or sub-auth-user | Integer | Required | Authentication parameter, *if you are a sub-user, you need to have READ AND WRITE permission to use this API call |
auth-password | String | Required | Authentication parameter |
id | Integer | Required | The ID of the monitoring check |
type | String | Required | The type of notification. It can be either webhook-up, webhook-down, mail, sms, telegram or Discord |
code | String | Optional | The phone code of your mobile number for SMS notifications. The Telegrams BotToken or the Discord Token. |
value | String | Required | The notification email,URL address, phone number or custom message |
chat-id | String | Optional | The Telegrams chat ID, or Discord's channel ID |
When the authentication of the API user is not correct, any API request will fail with the following status and statusDescription:
{"status":"Failed","statusDescription":"Invalid authentication, incorrect auth-id or auth-password."}
When the record-id is incorrect or missing, the API request will fail with the following status and statusDescription:
{"status":"Failed","statusDescription":"Invalid request."}
When the type of the notification is incorrect, the API request will fail with the following status and statusDescription:
{"status":"Failed","statusDescription":"Invalid notification type."}
Keep in mind that if you try to use this API call as a sub-user, it will fail with the following status and statusDescription:
{"status":"Failed","statusDescription":"You cannot create sms notifications!"}
Note: These are example errors in JSON format.
URL JSON: https://api.cloudns.net/monitoring/add-notification.json
POST/GET:
auth-id=0&auth-password=password&id=125&type=webhook-up&value=https://example.com
sub-auth-id=0&auth-password=password&id=125&type=webhook-up&value=https://example.com
URL XML: https://api.cloudns.net/monitoring/add-notification.xml
POST/GET:
auth-id=0&auth-password=password&id=125&type=webhook-up&value=https://example.com
sub-auth-id=0&auth-password=password&id=125&type=webhook-up&value=https://example.com