🌐 TizWildin HUB API Reference

Cloudflare Worker backend for authentication, licensing, subscriptions, and community features

https://tizwildin-hub.admension.workers.dev

📋 Table of Contents

💚 Health & Status

GET /health

Returns service health status and version.

Response
{ "status": "ok", "version": "1.0.0" }
GET /hub/community-stats

Returns community statistics for the HUB dashboard including user count and giveaway progress.

Response
{
  "totalUsers": 42,
  "giveawayProgress": 4.2,
  "giveawayTarget": 1000,
  "capacity": 1200,
  "warningThreshold": 1000
}

🔐 Authentication

POST /auth/google/signin

Track a Google OAuth sign-in. Creates or updates user record with geodata (IP, country, city, timezone).

Request Body
emailstringUser's email address
namestringUser's display name
googleIdstringGoogle OAuth ID
Response
{
  "ok": true,
  "email": "user@example.com",
  "isNewUser": false,
  "loginCount": 5
}
POST /hub/signin

Sign in to HUB (creates account if not exists).

Request Body
emailstringUser's email address
namestringUser's display name

🔑 ProEQ8 Licensing

POST /activate

Activate a ProEQ8 license on a device. Maximum 3 devices per license.

Request Body
emailstringLicense owner's email
licenseKeystringBase64-encoded license key
deviceIdstringUnique device identifier (8-128 chars)
Response
{
  "ok": true,
  "activationId": "act_uuid",
  "product": "ProEQ8",
  "expiresAt": "2027-05-28T00:00:00.000Z"
}
POST /deactivate

Deactivate a license from a device.

Request Body
emailstringLicense owner's email
deviceIdstringDevice to deactivate
POST /verify

Verify a license is valid (called periodically by plugin).

Request Body
emailstringLicense owner's email
licenseKeystringLicense key to verify
deviceIdstringDevice identifier
POST /recover

Recover license key by email (sends email with license).

Request Body
emailstringEmail to recover license for

👥 Master Key Subscriptions

Master Key is a subscription allowing 1-3 seats at $3 CAD/seat/month. The subscription owner can link team member emails to seats.

GET /hub/master-key/status?email={email}

Get Master Key subscription status. Response differs for owners vs linked users.

Owner Response
{
  "hasMasterKey": true,
  "isOwner": true,
  "canManageSeats": true,
  "seats": 2,
  "seatsUsed": 1,
  "linkedEmails": ["teammate@example.com"],
  "licenses": { "teammate@example.com": "license-key" },
  "status": "active"
}
Linked User Response
{
  "hasMasterKey": true,
  "isOwner": false,
  "canManageSeats": false,
  "ownerEmail": "owner@example.com",
  "license": "your-license-key"
}
POST /hub/master-key/link

Link an email to a Master Key subscription (owner only). Generates a license for the linked user.

Request Body
primaryEmailstringSubscription owner's email
linkedEmailstringEmail to link to a seat
Response
{
  "ok": true,
  "linkedEmail": "teammate@example.com",
  "license": "generated-license-key",
  "seatsUsed": 1,
  "seatsTotal": 2,
  "linkedEmails": ["teammate@example.com"]
}
POST /hub/master-key/unlink

Unlink an email from a Master Key subscription (owner only).

Request Body
primaryEmailstringSubscription owner's email
linkedEmailstringEmail to unlink
POST /hub/master-key/reset

Clear all linked seats (owner only).

Request Body
primaryEmailstringSubscription owner's email

👤 HUB Account

GET /hub/account?email={email}

Get full account status including licenses and Master Key subscription.

Response
{
  "email": "user@example.com",
  "hubAccount": {
    "name": "User Name",
    "provider": "google",
    "verified": true,
    "created": "2026-05-28T14:00:00.000Z"
  },
  "licenses": [{
    "product": "ProEQ8",
    "licenseKey": "key-here",
    "purchaseDate": "2026-05-28T14:00:00.000Z",
    "activations": 1,
    "maxActivations": 3
  }],
  "masterKey": {
    "isOwner": true,
    "canManageSeats": true,
    "seats": 2,
    "seatsUsed": 1,
    "linkedEmails": ["teammate@example.com"],
    "status": "active"
  }
}

💳 Stripe Checkout

POST /create-checkout

Create a Stripe checkout session for ProEQ8 one-time purchase ($29.99 CAD).

Request Body
emailstringCustomer email
successUrlstringRedirect URL on success
cancelUrlstringRedirect URL on cancel
Response
{ "checkoutUrl": "https://checkout.stripe.com/..." }
POST /create-checkout/master-key

Create a Stripe checkout session for Master Key subscription (1-3 seats at $3 CAD/seat/month).

Request Body
emailstringCustomer email
seatsnumberNumber of seats (1-3)
successUrlstringRedirect URL on success
cancelUrlstringRedirect URL on cancel

⚙️ Admin Endpoints

🔒 Authentication Required: Admin endpoints require Authorization: Bearer {first-16-chars-of-RESEND_API_KEY}
GET /admin/subscribers

Get list of all HUB subscribers with geodata.

POST /admin/send-weekly-newsletter

Manually trigger the weekly newsletter send.

❌ Error Handling

All endpoints return errors in a consistent format:

{ "error": "Error message here" }
400Bad request (invalid input, missing fields)
401Unauthorized (invalid signature/auth)
403Forbidden (no permission, seats full)
404Not found
429Rate limit exceeded (60 req/min/IP)
500Internal server error
Back to Docs 🎛️ HUB Dashboard 💚 Health Check