Skip to content

Quick start

Make a token, make your first call, then create a WordPress site from your own code.

3 min read Updated

This guide takes you from your first token to a WordPress site made from your own code, in a few minutes. Every step comes in cURL, JavaScript, PHP and Python, and with the SDK: pick your language on any sample, and the others follow.

Before you start

  • Your own Rabbitflare account. API tokens belong to the account's owner, so team members can't make them.
  • Two-factor authentication turned on: making a token asks for a code from your authenticator app. The API opens once the account's email address is confirmed and its first payment is made.
  • A server to put the site on. Step 2 lists yours; you can also create one through the API.
  • To run the samples: curl, Node.js 18 or later (save the JavaScript as an .mjs file), PHP with its curl extension, or Python 3 with requests (pip install requests).

1. Make a token

  1. Open the API page

    In the control panel, open API in the sidebar and choose Generate new token.

  2. Say what it may do

    Name it, like Quick start. Under Access, choose Custom and tick View servers, View sites and Create sites: enough to list your servers and to create a site. Read only is enough if you only want to look around. Leave it on all servers, and its expiry at 90 days.

  3. Confirm it's you

    Enter the 6-digit code from your authenticator app, and choose Generate token.

  4. Copy the token

    Copy it now: it's shown only this once. We keep only a fingerprint of it, so it can't be shown to you again.

    The new token shown once, with a Copy button, a warning that it won't be shown again, and a cURL command to try it.
    The token is shown this once, with a command to try it.

Keep the token in an environment variable, not in your code. Every sample in these docs reads it from RABBITFLARE_TOKEN:

Shell
export RABBITFLARE_TOKEN="rfp_ExampleTokenNotRealExampleTokenNotReal00Ex4mpl"

That token is a made-up example: paste yours. In a CI job or on a server, put it in the job's secrets or the server's environment instead (see the security checklist).

2. Make your first call

List your servers with GET /v1/servers:

curl "https://api.rabbitflare.com/v1/servers" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN"

Every answer is JSON. This one holds your servers, like this:

200 OK
{
  "data": [
    {
      "id": "3f6c1a2b-8d4e-4b7a-9c2d-1e5f7a8b9c0d",
      "name": "Production",
      "status": "active",
      "stage": "complete",
      "pendingAction": null,
      "cloud": "digitalocean",
      "region": "fra1",
      "planId": "business",
      "priceMonthlyCents": 5200,
      "currency": "usd",
      "ipv4": "203.0.113.10",
      "ipv6": "2001:db8::10",
      "phpVersion": "8.3",
      "backupsEnabled": true,
      "automaticBackupsBy": null,
      "billing": {
        "method": "card",
        "status": "active",
        "currentPeriodEnd": "2026-12-18T08:46:49.000Z"
      },
      "pendingPlanId": null,
      "scheduledDeletionAt": null,
      "trial": false,
      "specs": null,
      "siteCount": 2,
      "dataTransfer": null,
      "phpSecurity": {
        "state": "current",
        "reason": null,
        "build": "8.3.6-0ubuntu0.24.04.13",
        "packages": 14,
        "fixes": [],
        "restart": [],
        "auto": true,
        "listsAt": "2026-11-18T06:12:04.000Z",
        "securityAt": "2026-11-17T21:30:00.000Z",
        "checkedAt": "2026-11-18T07:00:31.000Z",
        "error": null
      },
      "security": {
        "status": "on",
        "available": true
      },
      "lastError": null,
      "readyAt": "2026-11-18T08:51:12.000Z",
      "createdAt": "2026-11-18T08:46:49.000Z",
      "updatedAt": "2026-11-18T09:02:31.000Z"
    }
  ],
  "pagination": {
    "limit": 25,
    "hasMore": false,
    "nextCursor": null
  }
}
data
Your servers, newest first, each a Server object.
id
The server's id. Calls about the server use it, like GET /v1/servers/{serverId}, and the next step needs it.
status
active when it's running; provisioning while it's being set up.
cloud, region, planId
Where it runs and its plan, by their ids in the catalogue.
pagination
Lists come a page at a time, 25 items unless you ask for more. hasMore is false, so this page holds every server (see Pagination).

3. Create a WordPress site

Now make something: a WordPress site on one of your servers, with POST /v1/sites. Put the server's id in serverId, and choose the site's name, its title and its WordPress administrator:

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]"
}'

The answer comes straight away: 201 Created, with the new site and its status queued, while your server installs it. 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.

Wait until it's live

Read the site every 10 seconds until its status is active:

curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN"

Then open its url. It answers on its built-in address (builtInDomain) until you connect your own domain. If the install fails, status is failed and lastError says why: try it again once that's fixed.

What's next

  • Authentication: what a token carries, and how to replace one without stopping your apps.
  • Scopes: give each token only what it needs.
  • Errors: what a failed request answers, and which errors are worth retrying.
  • Long-running operations: follow servers and sites while they're set up.
  • Webhooks: have Rabbitflare tell your own URL when something happens, instead of asking.

Still have a question?

Our team answers support tickets about the API, and other developers answer in the community.

Contact support

Popular

API docs