webhookAPI

API Documentation

Overview

  • API URL: <https://happ-proxy.com> (relative paths are used below)

  • Response Format: application/json

  • Response Codes: HTTP code 200. The result of the request is provided in the rc and msg fields of the response body.

Terms and Entities

  • provider_code β€” 8 characters [A-Za-z0-9]{8} (Provider ID).

  • auth_key β€” 32 characters [-_A-Za-z0-9]{32} (Provider authorization key).

  • install_code β€” 12 characters [A-Za-z0-9]{12} (Installation code).

  • domain_hash β€” 64 characters [a-z0-9]{64} (SHA-256 of the subscription domain, lowercase).


GET /api/add-install

Purpose: Create a provider link.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

  • install_limit (int, required) β€” from 1 to 100

  • install_code (string, optional) β€” 12 characters. If not provided, it will be automatically generated.

  • note (string, optional) β€” 255 characters

Responses

  • Success:

  • install_code already exists:

  • Validation/Authorization/Limit error:

Example


GET /api/update-install

Purpose: Modify a provider link.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

  • id (number, required)

  • install_limit (int, optional) β€” from 1 to 100. If not specified, the value remains unchanged. Cannot be less than the current install_count.

  • note (string, optional) β€” 255 characters. If not specified, the value remains unchanged.

  • status (int, optional) β€” 5 (Disabled) / 10 (Active). If not specified, the value remains unchanged.

Responses

  • Success:

  • Validation/Authorization/Limit error:

Example


GET /api/list-install

Purpose: Retrieve a list of provider links.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

  • id (number, optional) β€” If not provided, returns the last 5000 records.

Responses

  • Success:

    • status values:

      • 5 β€” Disabled

      • 10 β€” Active

  • Validation/Authorization error:

Example


GET /api/list-hwid

Purpose: Retrieve a list of HWIDs associated with a provider link.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

  • install_code (string, required) β€” Required if install_id is not provided.

  • install_id (number, required) β€” Required if install_code is not provided.

  • hwid (string, optional) β€” If not provided, returns the last 5000 records.

Responses

  • Success:

  • Validation/Authorization error:


GET /api/delete-hwid

Purpose: Delete an HWID from a provider link.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

  • install_code (string, required) β€” Required if install_id is not provided.

  • install_id (number, required) β€” Required if install_code is not provided.

  • hwid (string, required)

Responses

  • Success:

  • Validation/Authorization error:


GET /api/add-domain

Purpose: Link a subscription domain to a provider.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

  • domain_name (string, optional) β€” Description of the domain for the domain_hash. If not provided, it will be created from domain_hash.

  • domain_hash (string, required) β€” SHA-256 of the domain in lowercase (64 hex).

Responses

  • Success:

  • domain_hash already exists:

  • Validation/Authorization/Save error:


GET /api/delete-domain

Purpose: Delete a provider domain.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

  • id (number, required)

Responses

  • Success:

  • Validation/Authorization error:


GET /api/list-domain

Purpose: Retrieve a list of provider domains.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

  • id (number, optional) β€” If not provided, returns the last 5000 records.

Responses

  • Success:

    • status values:

      • 5 β€” Disabled

      • 10 β€” Active


2) General Requests for PUSH Notifications and Remote Control Commands

GET /remote/cancel

Purpose: Cancel a notification or command.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

  • id (number, required)

Rules:

  • You can only cancel your own broadcasts.

  • Cancellation is not possible less than 10 minutes before the scheduled delivery time.

Responses

  • Success:

  • Error:


GET /remote/list

Purpose: Retrieve a list of notifications and commands.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

  • id (number, optional) β€” ID of the notification/command. If not provided, returns the last 5000 records.

Responses

  • Success:

    • status values:

      • 5 / 6 β€” Load

      • 10 β€” Created

      • 20 β€” Checking

      • 30 β€” Pending

      • 40 β€” Sending

      • 100 β€” Sent

      • 110 β€” Sent with errors

      • 120 β€” Failed

      • 130 β€” Cancelled

      • 140 β€” Blocked

    • notification_type values:

      • 10 β€” Push

      • 20 β€” Command


3) Bulk PUSH Notifications

POST /remote/notification

Access: Requires an active subscription and Enterprise plan.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

Simple Body (JSON)

Full Body (JSON)

Constraints and Validation

  • The message body is serialized as JSON and base64 encoded; the base64 string size must be ≀ 4096 bytes.

  • If sending not by specific HWIDs, anti-spam applies: no more than once every 5 minutes for "general" broadcasts.

  • For VPN providers:

    • With hwid β€” HWIDs must belong to the provider's users.

    • With os β€” Broadcast only to provider's devices with the specified OS.


4) Remote Control Commands

POST /remote/command

Access: Requires an active subscription and Pro or Enterprise plan.

Query Parameters

  • provider_code (string, required) β€” 8 characters

  • auth_key (string, required) β€” 32 characters

Body (JSON)

  1. Send data for import

  1. Update all subscriptions

  1. Set Settings

Application Parameter Table

Parameter Name

Values

fragmentation-enable

true / false

fragmentation-packets

"tlshello" / "1-3"

fragmentation-length

Number

fragmentation-interval

Number

local-dns-enable

true / false

subscription-auto-update-enable

true / false

subscription-auto-update-open-enable

true / false

subscription-always-hwid-enable

true / false

subscription-autoconnect

true / false

subscription-ping-onopen-enabled

true / false

subscription-autoconnect-type

"lastused" / "lowestdelay"

notification-subs-expire

true / false

check-url-via-proxy

String

ping-type

"proxy" / "tcp" / "icmp"

fragmentation-type

"xray" / "advanced"

fragmentation-advanced-param

String

change-user-agent

String

app-auto-start

true / false

server-address-resolve-enable

true / false

server-address-resolve-dns-ip

String

server-address-resolve-dns-domain

String

per-app-proxy-mode

"off" / "on" / "bypass"

per-app-proxy-list

String

Custom

String


Additional Notes

  • Allowed HTML Tags in notification body are filtered (Basic tags: a, b, big, blockquote, br, cite, del, dfn, div, em, i, img, li, p, s, small, span, strike, strong, sub, sup, tt, u, ul; allowed attributes: href, title, src, alt; target="_blank" is allowed).

  • OS Values β€” ios, android.

  • Limits:

    • send-notification: General push without hwid β€” no more than once every 5 minutes.

    • Notification payload after base64 β€” up to 4096 bytes.

    • HWIDs in targeted sends β€” up to 5 per request.

Validation RegExp Summary

Field

Regex

provider_code

^[A-Za-z0-9]{8}$

auth_key

^[-_A-Za-z0-9]{32}$

install_code

^[A-Za-z0-9]{12}$

domain_hash

^[a-z0-9]{64}$

install_limit

integer 1..100

Would you like me to create a Postman collection for these endpoints?

Last updated