Skip to content

notify.php

Notification management module for sending various types of alerts including email, SMS, Telegram (Rocket), and Jira tickets.


notify/get_client_notification_vips

Retrieves a list of VIP clients for Telegram notifications based on provided email addresses and billing information.

HTTP method: POST|GET

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: get_client_notification_vips
token ✅ string Authorization token.
clients[] ❌ array<string> List of client identifiers in 'email
billing ❌ string Billing information used for VIP filtering.
clients ✅ string Параметр clients

Request example

curl -s "https://invapi.hostkey.com/notify.php" -X POST \
--data "action=get_client_notification_vips" \
--data "token=HOSTKEY_TOKEN" \
--data "clients=VALUE" \
--data "clients[][email protected]|123" \
--data "clients[][email protected]|456"
Success response example
{
"result": "OK",
"vips": [
{
"email": "[email protected]",
"telegram_id": "123456789"
},
{
"email": "[email protected]",
"telegram_id": "987654321"
}
]
}
Error examples
{
"code": -2,
"message": "$module: invalid token"
}

notify/get_settings

Retrieves notification settings for the current client and a template of all available settings.

HTTP method: POST|GET

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: get_settings
token ✅ string Authorization token.

Request example

curl -s "https://invapi.hostkey.com/notify.php" -X POST|GET \
--data "action=get_settings" \
--data "token=HOSTKEY_TOKEN"
Success response example
{
"result": "OK",
"client_settings": {
"email_enabled": true,
"sms_enabled": false,
"telegram_vips": [
"@user1",
"@user2"
]
},
"all_settings": {
"template_version": "1.0",
"available_channels": [
"mail",
"sms",
"rocket"
]
}
}
Error examples
{
"code": -2,
"message": "$module: authorization required"
}

notify/save_settings

Saves notification preferences for the authenticated customer. Requires master profile editing permissions if acting as a subaccount.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: save_settings
token ✅ string Authorization token for the request.
settings ❌ array<string> Configuration settings to be saved for the customer.

Request example

curl -s "https://invapi.hostkey.com/notify.php" -X POST \
--data "action=save_settings" \
--data "token=HOSTKEY_TOKEN" \
--data "settings[]=val1" \
--data "settings[]=val2"
Success response example
{
"result": "OK"
}
Error examples
{
"code": -1,
"message": "Permission denied"
}

notify/tg_test

Sends a test notification to the customer's Telegram bot. The message content depends on the user's location.

HTTP method: POST

Parameters:

Parameter Required Type Description
action ✅ string Method identifier: tg_test
token ✅ string Authorization token.

Request example

curl -s "https://invapi.hostkey.com/notify.php" -X POST \
--data "action=tg_test" \
--data "token=HOSTKEY_TOKEN"
Success response example
{
"result": "OK"
}
Error examples
{
"code": -1,
"message": "Please check your username and that you've started dialog with our bot"
}
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×