Short answer: Define a spam filtering product in WHMCS; when an order is activated (through a hook or a custom provisioning module), send a domain-create request to the Spambil reseller API, and a cancel request when the service is terminated. There's no ready-made WHMCS module for Spambil; the integration is a few simple HTTP requests authenticated with an API key.
Integration flow
- Product: create a "Spam and virus protection" product in WHMCS with a domain field.
- Provisioning: when the order is activated, add the customer's domain and mail server to Spambil.
- Welcome email: send the MX records shown in your reseller panel, or update DNS yourself if you host it.
- Verification: confirm setup with the MX check endpoint.
- Termination: cancel the domain in Spambil when the service ends.
API requests you'll use
Every request uses the header Authorization: Bearer sb_live_<your key>. You create the API key in your reseller panel.
Add a domain:
curl -X POST https://spambil.com/api/reseller/domains \
-H "Authorization: Bearer sb_live_<your key>" \
-H "Content-Type: application/json" \
-d '{"domain":"customer.com","mailHost":"mail.customer.com"}'
Bulk import (e.g. migrating existing customers): POST /api/reseller/domains/bulk.
MX check: GET /api/reseller/domains/:id/mx-check. Cancel: POST /api/reseller/domains/:id/cancel.
All request/response fields, error codes and the other endpoints (quarantine, lists, statistics): reseller API docs.
Where it plugs into WHMCS
- Custom provisioning module: using WHMCS's server module structure, send the create request in
CreateAccountand the cancel request inTerminateAccount. This is the cleanest option. - Hooks: for a simpler start, send the same requests from hooks on order activation and cancellation.
- Error handling: turn API error codes (e.g. domain already added, invalid domain) into an admin note or support ticket so failed setups don't go unnoticed.
If you use your own client area or another billing platform, the same requests work there too.
Customer experience
The customer orders, pays you, and the service is provisioned automatically. You manage quarantine, allow/block lists and statistics from your reseller panel (or your own panel through the API). Your customers receive no Spambil-branded emails.
Run a hosting company, MSP or IT service? Apply for the Spambil reseller program; applications are usually reviewed within 1–2 business days.
Frequently asked questions
Is there a ready-made WHMCS module?
Not at the moment. The integration is a few HTTP requests to the reseller API, sent from your own module or hooks.
Where do I get an API key?
After your reseller application is approved, you can create an API key in your reseller panel.
Can I migrate existing customers in bulk?
Yes, with a CSV import in the reseller panel or the bulk endpoint.