HfogDocsv1.0.0

HQ API

The publisher's own staff read and issue licences, read orders and prices, and block tunnel names with an HQ login's token.

HQ, the panel of the official edition, has a token API for its own staff. It answers only on the publisher's own server, and only for HQ logins. Hosting companies with bulk licences use the partner licence API with their partner key instead.

Where: https://api.yourdomain.com/v1/hq/…

Make a token

Where: HQ › your name at the top right › Password & security › API tokens

The card works as in the other panels: a name, Read only or Read & change, optional Allowed IPs, an optional Expires day, and your password. See API overview.

A token never does more than its login:

HQ login Its tokens
Full read, and with Read & change also change
Support read only
View-only read only; the card offers only Read only

Endpoints

Request What it does
GET /v1/hq/licences the licences, newest first (up to 200); ?q= searches key, email, IP and host name
GET /v1/hq/licences/{key} one licence
POST /v1/hq/licences issue a free licence: email, ip, optional notes, send (email the key), plan
POST /v1/hq/licences/{key}/revoke revoke: the panel locks at its next check and its subscription is cancelled
POST /v1/hq/licences/{key}/reinstate take a revoke back
GET /v1/hq/orders the licence checkouts started, paid or not (up to 500)
GET /v1/hq/plans Plans & pricing, read only: currency, base price, feature prices, account tiers, discounts, plans
GET /v1/hq/tunnels Hfog Tunnel: on or off, its domain, every customer's tunnel, the blocked names
POST /v1/hq/tunnels/{name}/block block a tunnel name for abuse: reason
POST /v1/hq/tunnels/{name}/unblock lift a block
bash
curl -s https://api.yourdomain.com/v1/hq/licences \
     -H "Authorization: Bearer hf_xxx" -H "Content-Type: application/json" \
     -d '{"email": "owner@example.com", "ip": "203.0.113.50", "send": true}'

Every change runs the same action as the button in HQ and is written to HQ's activity log.

Note: the official edition answers no other token API endpoint: /v1/accounts and the rest are "not found" there.