There was a problem loading the comments.

Using the Bulk Buy Hosting API With an AI Agent

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
  • 2 October 2026 7:11 AM

Who this is for: customers who want an AI agent (Claude, ChatGPT, Cursor, or any tool that can make HTTP requests) to build and manage their network instead of doing it by hand. You can point your agent straight at this article — it contains everything it needs to get started.

 

What Bulk Buy Hosting is

Bulk Buy Hosting places each of your sites on its own cPanel or DirectAdmin account at a different popular shared hosting company, across 15 providers and 125+ servers. Every account gets a unique IP owned by that provider, and no two of your sites share a server. You manage the whole network from one dashboard — or, as described here, over the API.

 

Each hosting account holds one domain (no addon domains), with 1GB disk and 20GB monthly bandwidth. Plans run from 10 domains up to 125.

 

Getting your API credentials

API access is included free on every plan.

 

1. Log in at https://billing.bulkbuyhosting.com/clientarea.php
2. Click the "API Access" button to retrieve your API credentials
3. You get two values: your user ID (a number, e.g. 1001) and your auth key

 

Credentials are scoped to your account, and you can regenerate them at any time. Treat the auth key like a password: give it to your agent through an environment variable or secret store, never pasted into a shared chat or committed to a repo.

 

API basics

- Base URL: https://api.bulkbuyhosting.com/v1/
- Method: POST, form-encoded
- Auth: every request includes user and auth as form fields
- Responses: JSON, always with a result field of success or error
- Interactive docs: https://api.bulkbuyhosting.com (Postman collection, runnable)

 

An error looks like this:

 

{ "result": "error", "message": "Auth values not valid." }

 

Endpoint reference

1. Test connection

 

Confirms a set of credentials works. Useful before a batch run, and essential if you're building a tool other customers will sign into with their own keys.

 

curl -X POST https://api.bulkbuyhosting.com/v1/testconnection/ \
  -d user=1001 -d auth=$BBH_AUTH_KEY -d domain=example.com

 

2. Deploy a domain

 

Adds a new domain to your account. We choose the server and IP so the network stays diverse — you don't pick.

 

curl -X POST https://api.bulkbuyhosting.com/v1/deploy/ \
  -d user=1001 -d auth=$BBH_AUTH_KEY -d domain=example.com

 

Returns result: success once provisioned. Call getsingledomain afterwards for the account's full details.

 

3. Get one domain

 

curl -X POST https://api.bulkbuyhosting.com/v1/getsingledomain/ \
  -d user=1001 -d auth=$BBH_AUTH_KEY -d domain=example.com

 

{
  "result": "success",
  "data": {
    "domain": "example.com",
    "serverhostname": "host6.webhostingprovider.com",
    "serverip": "127.128.129.130",
    "servertype": "cpanel",
    "username": "examplecom",
    "password": "de6lLqsQdJXwSjVwTAuyQ3",
    "nameservers": ["ns1.webhostingprovider.com", "ns2.webhostingprovider.com"]
  }
}

 

4. Get all domains

 

curl -X POST https://api.bulkbuyhosting.com/v1/getalldomains/ \
  -d user=1001 -d auth=$BBH_AUTH_KEY

 

Returns results (a count) and data (an array of your sites, each with domain, server hostname, IP, username and password).

 

Going further: the control panel API

This is the part that makes an agent genuinely useful. getsingledomain returns servertype, serverhostname, username and password — real credentials for a real control panel. Your agent can use them directly against that panel's own API and do most of what a human does in the panel: DNS records, mailboxes and forwarders, cron jobs, databases, file uploads, SSL, and the script installers that put WordPress on a site.

 

- cPanel (servertype: cpanel): UAPI at https://<serverhostname>:2083/execute/<Module>/<function>, HTTP basic auth with the username and password. Full API docs can be found here on the cPanel site: https://api.docs.cpanel.net/cpanel/introduction 
- DirectAdmin (servertype: directadmin): API at https://<serverhostname>:2222/CMD_API_<COMMAND>, same basic auth. Full API docs can be found here on the DirectAdmin site: https://docs.directadmin.com/developer/api/ 

 

Two caveats worth giving your agent up front: providers differ in which panel features and ports they expose, so it should handle a refused connection or a missing module gracefully and fall back to SFTP or the dashboard; and panel passwords change if you reset them, so re-read from getsingledomain rather than caching credentials for long.

 

Workflow Examples

Deploy a batch and record the results
1. getalldomains to see current usage against your plan limit
2. deploy each new domain, one at a time, checking result on each
3. getsingledomain for each new domain to collect IP, name servers and panel login
4. Write the results to your own records and report failures rather than retrying blindly

 

Stand up a site
1. Get the panel credentials for the domain
2. Either install WordPress through the panel's script installer, or — often better for a small content site — upload a static HTML page: lighter, faster, and nothing to keep patched
3. Set the name servers at your registrar to the ones returned for that account
4. Enable SSL (every provider offers free Let's Encrypt or equivalent)

 

Audit the network
1. getalldomains
2. For each, check the site responds over HTTPS, the IP matches what we returned, and the content is what you expect
3. Flag anything that's down or mismatched for a human

 

Rules of the road

- Stay inside your plan. Deploying past your domain limit will fail; upgrade in the dashboard first.
- One domain per account. Addon domains aren't supported - this is deliberate, it keeps the network diverse.
- Go sequentially. Deploy one domain at a time and pace your calls. This is a provisioning API, not a bulk endpoint; hammering it in parallel is the fastest way to get confusing errors.
- Never log credentials. Panel passwords come back in plain JSON. Keep them out of logs, transcripts and commit history.
- These are shared hosting accounts with 1GB disk and 20GB bandwidth each, intended for content sites. Don't point heavy traffic or an e-commerce store at them.
- On error, stop and read message. It's usually auth, a plan limit, or a domain that already exists. If it's none of those, open a ticket rather than retrying in a loop.

 

A starter prompt for your agent

You have access to the Bulk Buy Hosting API at https://api.bulkbuyhosting.com/v1/. My user ID is <ID> and the auth key is in the BBH_AUTH_KEY environment variable. All calls are form-encoded POSTs including user and auth. Endpoints: testconnection/, deploy/ (field: domain), getsingledomain/ (field: domain), getalldomains/. Start by calling getalldomains and showing me what's in my account. Deploy domains one at a time, confirm each with getsingledomain, and never print panel passwords in your output.

 

Related

 

- API overview: https://www.bulkbuyhosting.com/api/ 
- Full API docs (Postman): https://api.bulkbuyhosting.com 
- Using a network for AI visibility: https://www.bulkbuyhosting.com/generative-engine-optimisation/ 
- Plans and limits: https://www.bulkbuyhosting.com/pricing/ 


Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

© Bulk Buy Hosting