Skip to content
Suburban Cloud

Documentation

The Suburban Cloud REST API provides programmatic access to the same operations available in the console, including compute instances, applications, databases, storage, networking and domains. Requests are authenticated with scoped API keys and recorded in your organisation's audit log.

Getting Started

The following steps prepare an account for programmatic access.

  1. Create an Account

    Register for a Suburban Cloud account and create or join an organisation.

  2. Generate an API Key

    In the console, open Settings, then API Keys, and create a key limited to the services your integration requires.

  3. Identify Your Organisation and Project

    Note the organisation and project identifiers shown in the console. Resources are created within the project specified on each request.

  4. Make Your First Request

    Send an authenticated request to the API, as shown in the Authentication section below.

Authentication

Every request is made over HTTPS and carries the following headers.

Request headers
HeaderValueDescription
AuthorizationBearer <api-key>Required on every request. Store API keys in a secrets manager and never commit them to source control.
X-Organization-Id<organisation-id>The organisation on whose behalf the request is made. Required where a user or key belongs to more than one organisation.
X-Project-Id<project-id>The project within the organisation. Resources such as instances and applications are created in this project.

Example Authenticated Request

List instances
curl https://api.suburbancloud.ng/v2/compute/instances \
  -H "Authorization: Bearer $SUBURBAN_TOKEN" \
  -H "X-Organization-Id: $SUBURBAN_ORG" \
  -H "X-Project-Id: $SUBURBAN_PROJECT"

API Reference

The API accepts and returns JSON. All endpoints are versioned under a common base URL.

API conventions
ItemDetail
Base URLhttps://api.suburbancloud.ng/v2
FormatJSON request and response bodies
Response envelopeEach response contains success, data and error fields
Status codesStandard HTTP status codes indicate the outcome of each request
API keysConsole, Settings, API Keys

Common Endpoints

Common API endpoints
MethodPathDescription
GET/compute/instancesList Virtual Machine instances in the project
POST/compute/instancesCreate a Virtual Machine instance
GET/appsList App Engine applications
POST/appsCreate an App Engine application from a Git repository
GET/domains/check/{domain}Check the availability and price of a domain name

Example: Create an Instance

Create an instance
curl -X POST https://api.suburbancloud.ng/v2/compute/instances \
  -H "Authorization: Bearer $SUBURBAN_TOKEN" \
  -H "X-Organization-Id: $SUBURBAN_ORG" \
  -H "X-Project-Id: $SUBURBAN_PROJECT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "web-01",
    "region": "ng-abuja-1",
    "image": "ubuntu-24.04",
    "flavor": "c2.large",
    "sshKeyIds": ["key_123"],
    "publicIp": true
  }'

Example: Error Response

Error response
{
  "success": false,
  "data": null,
  "error": { "code": "VALIDATION_ERROR", "message": "flavor is required" }
}

On success, success is true and data contains the requested resource or list. On failure, error.message describes the problem.

Request bodies show commonly used fields only. The full field list for each endpoint is available in the Knowledge Base or from our support team.

Command-Line Interface

The Suburban CLI provides access to the REST API from a terminal or a CI/CD pipeline.

Availability

The Suburban CLI is currently in preview and is not yet generally available. Commands and options may change before general release. In the meantime, we recommend using the REST API directly or deploying through App Engine from Git.