Skip to content

Activation & Disconnect โ€‹

Base URL: https://your-domain.com/api/v1

๐Ÿงช Beta โ€” moves money & touches the router

These endpoints write RADIUS data and the ledger/invoice/balance. Test on your own instance before production use. Activation and disconnect are deliberately two separate calls: activate writes state, then you disconnect when ready.

Requires HTTP Basic Auth.

Activate / Renew / Change package โ€‹

POST /api/v1/activation/activate

One endpoint covers all three: pass the subscriber's current package to renew, a different package to change package; first-time activation is the same call.

ParamNotes
user_id (required)Subscriber ID
package_id (required)Package to activate/renew onto
  • Prepaid: the subscriber must have enough balance; otherwise 422.
  • Scope: RADIUS connection types (1, 2) only. API/router types (3โ€“5) return 422 (they need a live router push).
  • Idempotent: re-activation within 2 minutes returns 429.
  • Writes profile + RADIUS + money, without disconnecting โ€” call /disconnect afterward to push an online session onto the new profile.

200

json
{
  "success": "Activated Successfully.", "user_id": 1024, "package_id": 5,
  "new_expiration": "2026-08-04 23:59:59", "amount_charged": 1200,
  "note": "To force an online session onto the new profile, call /api/v1/activation/disconnect."
}

Errors: 422 insufficient balance / no reseller / unsupported connection type ยท 429 too frequent ยท 404 not found

cURL

bash
curl -X POST "https://your-domain.com/api/v1/activation/activate" \
  -u "user:pass" \
  -d "user_id=1024" -d "package_id=5"

Disconnect โ€‹

POST /api/v1/activation/disconnect โ€” Disconnect the subscriber's live session (the router-side action).

ParamNotes
user_id (required)Subscriber ID
  • 200: { "success": "Subscriber Successfully Disconnected." } (or "already offline")
  • 422: disconnect disabled in settings ยท 502: router disconnect failed

cURL

bash
curl -X POST "https://your-domain.com/api/v1/activation/disconnect" \
  -u "user:pass" -d "user_id=1024"

www.onezeroart.com