Create a site
/v1/sites Installs a new WordPress site on one of your servers, with the administrator you name. It's reached on its built-in address (builtInDomain); connect your own domain with POST /sites/{siteId}/domains.
What happens next. The answer is the site with status: "queued". On a running server the install starts at once and usually takes 1 to 2 minutes (installing, with stage wordpress, then ssl); on a server that's still being set up it starts as soon as the server is ready. Poll GET /sites/{siteId} every 10 seconds until status is active. If the install fails, status is failed with the reason in lastError; try again with POST /sites/{siteId}/actions/retry-install.
The administrator's password is made for you: read it with GET /sites/{siteId}/wordpress-login. Where the firewall is available, new sites start with it protecting them.
Limits. By default, 60 new sites an hour per account through the API (see Rate limits). Sites can't be added while their server is off, failed or being destroyed.
Scopes
The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).
-
sites:create - Create sites. Install new WordPress sites on your servers. Cloning a site also needs Manage sites.
Headers
| Field | Type and description |
|---|---|
Idempotency-Key | string 1 to 255 characters A key of your own for this request, like a UUID: letters, digits and |
Request body
JSON, with these fields. Fields that aren't listed are refused.
| Field | Type and description |
|---|---|
serverId Required | string The server to install the site on. It must be running or being set up. |
name Required | string 2 to 48 characters The site's name: 2 to 48 letters, numbers, spaces, dots, dashes or underscores, starting with a letter or number. |
siteTitle Required | string 1 to 120 characters The site's title in WordPress (up to 120 characters). It can be changed in WordPress later. |
adminUsername Required | string The WordPress administrator's username: 3 to 32 lowercase letters, numbers, dots, dashes or underscores. Not |
adminEmail Required | string Up to 254 characters The WordPress administrator's email address. |
resources | object What the site may use of its server. Left out: no limits of its own. |
cpuPercent | integer or null 5 to 100 The share of the server's processor the site may use, in percent of all its cores. 5 to 100%; null or left out: no limit of its own. |
memoryMb | integer or null 256 to 1,048,576 The memory the site may use (its PHP and scheduled tasks), in MB. At most the server's memory less 256 MB. 256 to 1,048,576 MB; null or left out: no limit of its own. |
processes | integer or null 32 to 4,096 How many processes the site may run at once. 32 to 4,096; null or left out: no limit of its own. |
priority | string The site's share of the processor when the server is busy: One of: |
workers | integer or null 1 to 64 How many PHP workers the site may run (requests served at once). Left out: set by the server's memory. 1 to 64; null or left out: no limit of its own. |
phpMemoryMb | integer or null 64 to 1,024 PHP's memory limit per request, in MB. Left out: 256 MB. 64 to 1,024 MB; null or left out: no limit of its own. |
timeLimit | integer or null 30 to 300 How long one request may run, in seconds. Left out: 120 seconds. 30 to 300 seconds; null or left out: no limit of its own. |
uploadMb | integer or null 8 to 512 The largest upload, in MB. Left out: 64 MB. 8 to 512 MB; null or left out: no limit of its own. |
inputVars | integer or null 1000 to 20,000 The most form fields one request may send. Left out: 5,000. 1,000 to 20,000; null or left out: no limit of its own. |
Example request
curl -X POST "https://api.rabbitflare.com/v1/sites" \
-H "Authorization: Bearer $RABBITFLARE_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"serverId": "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
"name": "Shop",
"siteTitle": "Example Shop",
"adminUsername": "editor",
"adminEmail": "[email protected]"
}' const res = await fetch("https://api.rabbitflare.com/v1/sites", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RABBITFLARE_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"serverId": "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
"name": "Shop",
"siteTitle": "Example Shop",
"adminUsername": "editor",
"adminEmail": "[email protected]"
}),
});
if (!res.ok) throw new Error(`Rabbitflare API error ${res.status}: ${await res.text()}`);
const { data } = await res.json();
console.log(data); import { Rabbitflare } from "@rabbitflare/api";
const rf = new Rabbitflare({ token: process.env.RABBITFLARE_TOKEN });
const data = await rf.sites.create({
serverId: "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
name: "Shop",
siteTitle: "Example Shop",
adminUsername: "editor",
adminEmail: "[email protected]",
});
console.log(data); <?php
$ch = curl_init('https://api.rabbitflare.com/v1/sites');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RABBITFLARE_TOKEN'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'serverId' => '3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d',
'name' => 'Shop',
'siteTitle' => 'Example Shop',
'adminUsername' => 'editor',
'adminEmail' => '[email protected]',
]),
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
throw new RuntimeException("Rabbitflare API error $status: $body");
}
print_r(json_decode($body, true)['data']); import os
import requests
response = requests.post(
"https://api.rabbitflare.com/v1/sites",
headers={
"Authorization": "Bearer " + os.environ["RABBITFLARE_TOKEN"],
},
json={
"serverId": "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
"name": "Shop",
"siteTitle": "Example Shop",
"adminUsername": "editor",
"adminEmail": "[email protected]",
},
timeout=120,
)
response.raise_for_status()
print(response.json()["data"]) Response
201 Created Returns the Site object in data.
The Site object's fields 58 fields
| Field | Type and description |
|---|---|
id | string The site's id. |
name | string The site's name, as shown in the panel. |
serverId | string The id of the server the site is on. |
server | object The server the site is on, at a glance. |
id | string The server's id. |
name | string The server's name. |
status | string The server's status (see the Server object). Known values: |
cloud | string Where the server runs (see the Server object). Known values: |
region | string The server's location id. |
ipv4 | string or null The server's public IPv4 address. Null until it has one. |
ipv6 | string or null The server's public IPv6 address. Null when it has none. |
status | string
Known values: |
stage | string How far the install has got: Known values: |
pendingAction | string or null A change in progress on the site: Known values: |
url | string The site's address, on its primary domain (https once its certificate is active). |
adminUrl | string The address of the site's WordPress dashboard. |
builtInDomain | string The address every site gets, which keeps working whatever domains it has. |
primaryDomain | string The domain the site is served on; other domains redirect to it. |
siteTitle | string The site's title in WordPress, as set when it was created. |
wordpress | object The WordPress administrator made with the site. The password is read with GET /sites/{siteId}/wordpress-login. |
adminUsername | string The WordPress administrator's username. |
adminEmail | string The WordPress administrator's email address. |
sslStatus | string The site's SSL certificate: Known values: |
cdn | string The included CDN for the site's static files: Known values: |
firewall | object The site's web application firewall. |
mode | string
Known values: |
status | string Whether its settings are in place on the server: Known values: |
malwareProtection | object The site's malware protection (Imunify360). |
enabled | boolean Whether malware protection (Imunify360's scanning and cleaning) is on for the site. |
included | boolean Whether the site is its server's included one, at no charge: the first with it on. Each other site with it on is billed. |
customResources | boolean Whether the site has resource settings of its own (limits, priority or PHP settings) rather than the server's defaults. |
stagingOf | object or null When this site is a staging copy: the live site it copies. Null otherwise. |
id | string The live site's id. |
name | string The live site's name. |
staging | object or null A live site's staging: its copy and the staging operation running now. Null when it never used staging. |
id | string or null The staging copy's id. Null when it has none now (only restore points, or an operation). |
status | string or null The staging copy's status (as a site's). Null when it has none. Known values: |
busy | string or null The staging operation running now: Known values: |
attention | boolean Whether the running staging operation is waiting for our team. |
clone | object or null When this site is a clone being made (or whose copy failed): the clone. Null once the copy is in, or when it never was a clone. |
id | string The clone's id. |
status | string
Known values: |
stage | string or null What's happening now, in words. Null when not known. |
progress | number or null 0 to 100 while copying. Null when not known. |
sourceName | string The name of the site being copied. |
error | string or null Why the copy failed. Null otherwise. |
clonedFrom | object or null The site this one was cloned from, and when. Null when it wasn't cloned. |
id | string or null The original site's id. Null once that site is deleted. |
name | string The original site's name. |
clonedAt | string An ISO 8601 time, in UTC When the clone was made. |
beingCloned | object or null A clone of this site being made right now: the new site. Null otherwise. |
id | string The new site's id. |
name | string The new site's name. |
iconUrl | string or null The site's own icon (WordPress's Site Icon), looked up once a day. Null when it has none. |
lastError | string or null Why the install or the last change failed. Null when nothing failed. |
readyAt | string or null An ISO 8601 time, in UTC When the site finished installing. Null until then. |
createdAt | string An ISO 8601 time, in UTC When the site was created. |
updatedAt | string An ISO 8601 time, in UTC When the site last changed. |
Example response
{
"data": {
"id": "8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"name": "Shop",
"serverId": "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
"server": {
"id": "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
"name": "Production",
"status": "active",
"cloud": "digitalocean",
"region": "fra1",
"ipv4": "203.0.113.10",
"ipv6": "2001:db8::10"
},
"status": "queued",
"stage": "queued",
"pendingAction": null,
"url": "http://shop-x7k2p.rabbitflare.link",
"adminUrl": "http://shop-x7k2p.rabbitflare.link/wp-admin/",
"builtInDomain": "shop-x7k2p.rabbitflare.link",
"primaryDomain": "shop-x7k2p.rabbitflare.link",
"siteTitle": "Example Shop",
"wordpress": {
"adminUsername": "editor",
"adminEmail": "[email protected]"
},
"sslStatus": "none",
"cdn": "off",
"firewall": {
"mode": "protect",
"status": "installing"
},
"malwareProtection": {
"enabled": true,
"included": true
},
"customResources": false,
"stagingOf": null,
"staging": null,
"clone": null,
"clonedFrom": null,
"beingCloned": null,
"iconUrl": null,
"lastError": null,
"readyAt": null,
"createdAt": "2026-11-18T10:15:02.000Z",
"updatedAt": "2026-11-18T10:15:02.000Z"
}
} Errors
The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).
| Status and code | When, and what to do |
|---|---|
403 feature_ | This product isn't open to the account. Contact support if you'd like it opened. |
404 not_ | The resource doesn't exist, or isn't this account's. Check the id. Ids of other accounts' resources answer the same way. |
409 server_ | The server isn't in a state that allows this (for example, it's off or still being set up). Start the server, or wait until it's active, then try again. |
422 validation_ | One or more fields are missing or wrong. Correct the fields named in |
Rate limit
Write requests: 30 a minute per token, 60 per account. New sites: 60 an hour per account. More in Rate limits.
Added on .