Hooks

Set Webhook for Traffic Monitoring

This endpoint allows setting up webhooks for traffic monitoring on a specified KVM VPS.
The api_host parameter, obtained from the "Create AUTH-session" response,
is dynamically set in the URL.
Provide the signature, kvm_id, valid_until, and webhook configuration details.

post/kvm/v2/hooks/set

Request

Request body application/x-www-form-urlencoded

signaturestring

The session signature obtained from the "Create AUTH-session" call.

kvm_idstring

The unique identifier of the KVM VPS.

valid_untilstring

The expiration timestamp for the session, as obtained from the "Create AUTH-session" call.

callback_methodstring

The HTTP method to use for the callback (post or get).

callback_userstring

(Optional) Username for callback authentication.

callback_pwstring

(Optional) Password for callback authentication.

typestring

Type of hook to create (only traffic is allowed).

trigger_valuestring

Trigger value to activate the webhook.

  • A percentage value for traffic usage (e.g., 80 for 80%).
  • Set to demo for immediate unique call.
callback_urlstring

The callback URL (HTTP or HTTPS) that receives notifications
when the trigger value is reached.
Example: https://example.com/yourcallback.
Source IP: 149.154.154.251

Example request

{
  "signature": "session_signature_12345",
  "kvm_id": "kvm_123456_789012",
  "valid_until": "1737476000",
  "callback_method": "post",
  "callback_user": "callback_user",
  "callback_pw": "callback_password",
  "type": "traffic",
  "trigger_value": "80",
  "callback_url": "https://example.com/yourcallback"
}

Response

Webhook set successfully.

statusstring

The status of the operation.

hook_idstring

The ID of the created webhook.

Example response

{
  "status": "success",
  "hook_id": "123"
}

Changes

No recorded changes to this operation across all 1 revision of this API.