WAF Reseller API
The reseller API manages many customers of Web Protection from your own portal or billing system. You see only the customers you created. Reseller accounts are issued by WireShield on request: contact us.
Connect
- Address:
https://waf.wireshield.network/api/v1 - Token: in the reseller panel, API Settings. It starts with
wsapi_and is shown once. - Header:
Authorization: Bearer wsapi_… - Errors, limits and formats are the same as in the WAF Customer API.
nullfor a limit means unlimited,0means none.
A typical flow
- Sale:
POST /customerswith a plan, thenPOST /customers/{id}/domains. The answer has adnstarget to show to the customer. - DNS: the customer changes their DNS.
GET /customers/{id}/domains/{domain_id}/dns-checktells when it arrived; the certificate is then issued by itself (or ask withPOST …/ssl). - Sign in:
POST /customers/{id}/login-linkreturns a one-time address (valid 15 minutes) that opens the WAF panel without a password. Make it at the moment of the click. - Billing: at month end
GET /usage?month=YYYY-MM. - Unpaid:
POST /customers/{id}/suspend, and…/unsuspendwhen paid.DELETE /customers/{id}ends the service (?permanent=truedeletes everything).
Plans and customers
| Call | What it does |
|---|---|
GET /plans | The plans you can give, with limits (sites, custom_rules, rate_limit_rules, captcha_monthly, captcha_keys) and features |
POST /customers | Creates a customer: email, name, plan_id, optional password or send_invite |
GET /customers, GET /customers/{id} | Lists, reads |
PUT /customers/{id} | Changes the plan ({"plan_id": "…"}) and limits. The account stays the same and its keys are kept |
DELETE /customers/{id} | Ends the service |
POST /customers/{id}/login-link | One-time sign-in address |
POST /customers/{id}/suspend · unsuspend | Switches the customer off / on |
POST /api/v1/customers
{"email": "ali@example.com", "name": "Example Ltd", "plan_id": "f980842a-e67c-4d9a-9456-65e4f6ffdc95", "send_invite": false}
An e-mail address can have only one account in the WAF panel. A customer who already has an account made outside your reseller cannot be created again: ask us to move that account under yours.
Sites of a customer
| Call | What it does |
|---|---|
GET /customers/{id}/locations | Locations the plan allows to choose (enabled: false = the best node is used) |
POST /customers/{id}/domains | Adds a site: domain, optional backend_servers (address, port, weight), location_id, www_redirect (none, www_to_main, main_to_www). The answer has dns |
GET /customers/{id}/domains, …/{domain_id} | Lists, reads |
GET …/{domain_id}/dns-check | Has the DNS arrived |
POST …/{domain_id}/ssl | Asks for the certificate now |
POST …/{domain_id}/backends, DELETE …/backends/{backend_id} | Origin servers (up to 20) |
PUT …/{domain_id}/waf?enabled=true | Protection on / off |
DELETE …/{domain_id} | Deletes the site |
Usage
GET /usage?month=YYYY-MM returns every customer of the month in one call: plan, number of sites, traffic (requests, blocked, challenged, bytes) and captcha_verifications. GET /customers/{id}/usage is the same for one customer.
wsCAPTCHA
| Call | What it does |
|---|---|
GET /customers/{id}/captcha | Keys and this month's use against the plan |
POST /customers/{id}/captcha/keys | Creates a key (name, domains). The answer has the site key and the secret, shown once |
PUT /customers/{id}/captcha/keys/{key_id} | Changes name, domains, on/off |
POST /customers/{id}/captcha/keys/{key_id}/secret | Makes a new secret |
GET …/{key_id}/stats?period=24h or 7d | Counts |
GET …/{key_id}/events?limit=100 | Verification log |
DELETE …/{key_id} | Deletes the key |
The check itself is described in the wsCAPTCHA integration guide.