webhookAPI

General Information

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

  • Response Format: application/json

  • Status Codes: HTTP 200. The result of the request is provided in the rc and msg fields within the JSON body.

Terms and Entities

Term

Format

Description

provider_code

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

Provider ID (8 characters)

auth_key

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

Provider authorization key (32 characters)

install_code

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

Installation code (12 characters)

domain_hash

[a-z0-9]{64}

SHA-256 hash of the subscription domain (lowercase)


GET /api/add-install

Query Parameters

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

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

  • install_limit (int, required) β€” Installation limit (1–100)

  • install_code (string, optional) β€” 12 characters. Generated automatically if not provided.

  • note (string, optional) β€” Description/Note (up to 255 characters)

Responses

  • Success (rc: 1): { "rc": 1, "msg": "Ok", "install_code": "...", "id": 33 }

  • Error (rc: 2): Install code already exists.

  • Error (rc: 0): Auth error, limit error, or validation error.

Example:

Bash


GET /api/update-install

Query Parameters

  • id (number, required) β€” Record ID

  • install_limit (int, optional) β€” 1–100. Cannot be lower than current install_count.

  • status (int, optional) β€” 5 (Disabled) / 10 (Active)

  • note (string, optional) β€” Update note content.

Responses

  • Success (rc: 1): { "rc": 1, "msg": "Ok", "install_code": "..." }

  • Error (rc: 0): Install not found, Install status error, etc.


GET /api/list-install

Query Parameters

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

Status Values in Response

  • 5 β€” Disabled

  • 10 β€” Active


HWID Management (Device List)

  • Get HWID List: GET /api/list-hwid β€” Retrieve HWIDs associated with an install link.

  • Delete HWID: GET /api/delete-hwid β€” Remove a HWID to free up an installation slot.


Domain Management

  • Link Domain: GET /api/add-domain (requires domain_hash)

  • Delete Domain: GET /api/delete-domain (by id)

  • List Domains: GET /api/list-domain


2. Push Notifications & Remote Control

List Notifications and Commands

GET /remote/list

Allows tracking the status of broadcasts and commands.

  • Status Values: 10 (Created), 40 (Sending), 100 (Sent), 130 (Cancelled).

  • Notification Types: 10 (Push), 20 (Command).


Cancel Notification or Command

GET /remote/cancel

Rules:

  • You can only cancel your own broadcasts.

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


Bulk PUSH Notifications

POST /remote/notification

Access: Enterprise plan + Active subscription.

Targeting:

  • By OS: "os": ["android", "ios"]

  • By HWID: "hwid": "ID1,ID2" (up to 5 IDs)

Localization (Body JSON):

Supports localized titles and bodies for RU, EN, CN, FA.

Note: The message body is base64 encoded. Maximum payload size is 4096 bytes.


3. Remote Control Commands

POST /remote/command

Access: Pro or Enterprise plan.

Action Types (action_type):

  1. import-data: Transfers a data string (configs) to the app.

  2. update-subscription: Forces a subscription update on the device.

  3. sub-change: Changes the subscription domain or URL.

  4. set-settings: Modifies internal app settings.

Available App Settings (set-settings):

Parameter

Values

fragmentation-enable

true / false

local-dns-enable

true / false

subscription-autoconnect

true / false

ping-type

"proxy" / "tcp" / "icmp"

per-app-proxy-mode

"off" / "on" / "bypass"


Technical Constraints & Validation

Field

Regex / Rule

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}$ (SHA-256)

Anti-spam

General Push (no HWID) β€” max 1 per 5 minutes

Last updated