Authentication
Create a token in the control panel. Send it as a Bearer token on every request.
Authorization: Bearer bch_live_…
REST for websites, domains, DNS, email, VPS and billing. Same actions as the control panel, for scripts and CI.
Create a token in the control panel. Send it as a Bearer token on every request.
Authorization: Bearer bch_live_…
| Method | Path | |
|---|---|---|
| GET | /api/v1/account | Profile |
| GET | /api/v1/websites | Websites |
| POST | /api/v1/websites | Create website |
| GET | /api/v1/websites/{id} | Website + files, DNS, PHP |
| POST | /api/v1/websites/{id}/cache | Purge cache |
| GET | /api/v1/domains | Domains |
| GET | /api/v1/domains/check?q= | Availability |
| GET | /api/v1/domains/{id}/dns | DNS records |
| POST | /api/v1/domains/{id}/dns | Replace DNS |
| GET | /api/v1/emails | Mailboxes |
| POST | /api/v1/emails | Create mailbox |
| GET | /api/v1/vps | VPS list |
| POST | /api/v1/vps/{id}/power | start | stop | restart |
| GET | /api/v1/billing | Invoices |
curl https://hosting.bcom.africa/api/v1/domains/check?q=shop.co.tz \
-H "Authorization: Bearer bch_…"
curl https://hosting.bcom.africa/api/v1/websites \
-H "Authorization: Bearer bch_…" \
-H "Content-Type: application/json" \
-d '{"domain":"shop.co.tz","type":"wordpress","plan":"business"}'