REST API

API Docs

Authentication

Every request must include a valid API key. Generate one from the API Keys section of your dashboard.

Pass your key in the Authorization header using the Bearer scheme:

Authorization: Bearer YOUR_API_KEY

Example:

curl https://dashboard.bithost.io/api/v1/user \
  -H "Authorization: Bearer YOUR_API_KEY"

API keys cost $10.00 and remain valid for 3 months from the date of purchase.

Base URL

All endpoints are served over HTTPS under a versioned path:

https://dashboard.bithost.io/api/v1

Responses & Errors

All responses are JSON. Successful responses wrap data in a named key matching the resource type. Single-object responses use the singular form; collection responses use the plural.

// Collection
{ "servers": [...] }

// Single object
{ "server": { ... } }

// Error
{
  "errors": [
    { "code": "insufficient_funds", "message": "Insufficient funds to create server" },
    { "code": "blank", "message": "can't be blank", "field": "name" }
  ]
}

HTTP Status Codes

StatusMeaningWhen it occurs
200SuccessRequest completed successfully
401UnauthorizedMissing or invalid API key
403ForbiddenAccount not allowed to perform this action
404Not FoundResource does not exist
422Unprocessable EntityValidation or business-logic failure
500Internal Server ErrorUnexpected error on our end

Error Codes

CodeDescription
internal_errorUnexpected server error
unauthenticatedMissing or invalid API key
lockedAccount is locked
not_foundRequested resource does not exist
busyResource is currently processing another operation
insufficient_fundsAccount balance is too low for this operation
no_keysNo SSH keys are configured on the account
quota_exceededServer limit for the account has been reached
unconfirmedAccount email address has not been confirmed
invalid_snapshotSnapshot does not belong to the authenticated user
blankA required field was left empty
invalidA field value is not in the expected format
takenThe value is already in use (duplicate)
too_longValue exceeds the maximum allowed length
too_shortValue is shorter than the minimum required length
not_a_numberA numeric value was expected
confirmationConfirmation field does not match

Pagination

Collection endpoints return up to 50 items per page. Navigate pages with the page query parameter. Every paginated response includes a meta.pagination object:

{
  "servers": [...],
  "meta": {
    "pagination": {
      "page": 2,
      "has_previous_page": true,
      "has_next_page": false
    }
  }
}

Use has_next_page to determine whether additional pages are available.

User

GET /api/v1/user

Returns the profile and account balance of the authenticated user.

curl https://dashboard.bithost.io/api/v1/user \
  -H "Authorization: Bearer YOUR_API_KEY"

Response:

{
  "user": {
    "email": "[email protected]",
    "full_name": "John Doe",
    "balance": 42.50,
    "server_limit": 10
  }
}
FieldTypeDescription
emailstringAccount email address
full_namestringDisplay name
balancefloatCurrent account balance in USD
server_limitintegerMaximum number of servers allowed

Servers

Servers are the core resource in the bithost API. Each server represents a cloud instance running on one of the supported providers.

Server object

FieldTypeDescription
idintegerUnique server identifier
namestringServer hostname
pendingbooleanWhether the server is processing an operation
powerbooleanWhether the server is powered on
cost_so_farfloatAccumulated cost in USD for the current billing period
statusstringactive, pending, or deleted
backups_enabledbooleanWhether automatic backups are enabled
messagestring or nullStatus message (e.g. error details)
ip_addressstring or nullPrimary public IPv4 address
private_ip_addressstring or nullPrivate IPv4 address
ip_address_v6string or nullPublic IPv6 address
private_ip_address_v6string or nullPrivate IPv6 address
providerstringProvider slug: digital_ocean, linode, hetzner, vultr
GET /api/v1/servers

Returns a paginated list of all servers. Accepts a page query parameter.

curl https://dashboard.bithost.io/api/v1/servers \
  -H "Authorization: Bearer YOUR_API_KEY"
GET /api/v1/servers/:id

Returns the details of a single server.

curl https://dashboard.bithost.io/api/v1/servers/123 \
  -H "Authorization: Bearer YOUR_API_KEY"
POST /api/v1/servers

Provisions a new server. The server is created asynchronously - it will appear immediately with status: "pending" and transition to "active" once the provider finishes provisioning.

Requirements: confirmed email, at least one SSH key, sufficient balance to cover 5 days of usage at the selected size's hourly rate, and must not exceed the server limit.

ParameterRequiredDescription
nameYesServer hostname
size_idYesInstance size ID (see Sizes)
region_idYesRegion ID (see Regions)
image_idYesOS image ID (see Images)
providerYesProvider slug: digital_ocean, linode, hetzner, vultr
key_idsNoArray of SSH key IDs to install on the server
backups_enabledNoSet to true to enable automatic backups
termsYesMust be true to accept the terms of service
curl -X POST https://dashboard.bithost.io/api/v1/servers \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "web-prod-02",
    "size_id": 5,
    "region_id": 10,
    "image_id": 20,
    "provider": "digital_ocean",
    "key_ids": [1, 2],
    "backups_enabled": true,
    "terms": true
  }'

Common errors: insufficient_funds, no_keys, quota_exceeded, unconfirmed.

DELETE /api/v1/servers/:id

Destroys a server. This action is irreversible - all data on the server will be permanently lost.

curl -X DELETE https://dashboard.bithost.io/api/v1/servers/123 \
  -H "Authorization: Bearer YOUR_API_KEY"
POST /api/v1/servers/:id/power

Controls the power state of a server. Returns the updated server object.

ParameterRequiredDescription
action_typeYesOne of: on, off, reboot
POST /api/v1/servers/:id/backup

Enables or disables automatic backups. Returns the updated server object.

ParameterRequiredDescription
automaticYestrue to enable backups, false to disable
POST /api/v1/servers/:id/rebuild

Rebuilds a server with a new OS image. Wipes all existing data and reinstalls the OS. The image must belong to the same provider as the server. Returns the updated server object with pending: true.

ParameterRequiredDescription
image_idYesThe ID of the OS image to install
POST /api/v1/servers/:id/resize

Resizes a server to a different instance type. By default the resize is flexible and can be reversed. Set permanent to true for a permanent disk resize. Returns the updated server object with pending: true.

ParameterRequiredDescription
size_idYesThe ID of the target size
permanentNotrue for a permanent disk resize. Default: false
POST /api/v1/servers/:id/snapshot

Creates a point-in-time snapshot of the server asynchronously. The server will enter a pending state while the snapshot is being taken. Returns a busy error if the server is already processing another operation.

ParameterRequiredDescription
nameYesA label for the snapshot
PATCH /api/v1/servers/:id/clear_message

Clears the status message on a server. Useful after acknowledging an error or informational message. Returns the server object with message: null.

Providers

GET /api/v1/providers

Returns the list of cloud providers available to the authenticated user. Use the slug value when referencing a provider in other endpoints.

curl https://dashboard.bithost.io/api/v1/providers \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "providers": [
    { "id": 1, "name": "DigitalOcean", "slug": "digital_ocean" },
    { "id": 2, "name": "Linode",       "slug": "linode" },
    { "id": 4, "name": "Vultr",        "slug": "vultr" }
  ],
  "meta": { "pagination": { "page": 1, "has_previous_page": false, "has_next_page": false } }
}

Available provider slugs: digital_ocean, linode, hetzner, vultr.

SSH Keys

SSH keys are installed on new servers during provisioning. You must have at least one SSH key on your account before creating a server.

GET /api/v1/keys

Returns a paginated list of the SSH keys on your account.

curl https://dashboard.bithost.io/api/v1/keys \
  -H "Authorization: Bearer YOUR_API_KEY"
{
  "keys": [
    { "id": 1, "label": "macbook-pro",  "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA..." },
    { "id": 2, "label": "work-desktop", "key": "ssh-rsa AAAAB3NzaC1yc2EAAAA..." }
  ],
  "meta": { "pagination": { "page": 1, "has_previous_page": false, "has_next_page": false } }
}
POST /api/v1/keys

Adds a new SSH public key to your account. The key is passed inside a nested key object.

ParameterRequiredDescription
key[label]YesA human-readable label for the key
key[key]YesThe SSH public key (e.g. ssh-ed25519 AAAA...)
curl -X POST https://dashboard.bithost.io/api/v1/keys \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "key": {
      "label": "deploy-server",
      "key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample..."
    }
  }'

Sizes

Sizes represent the hardware configuration (CPU, memory, disk, bandwidth) for a server. Available sizes vary by provider and region.

GET /api/v1/sizes

Returns a paginated list of available instance sizes. When server_id is provided, returns only the sizes that the specified server can be resized to.

ParameterRequiredDescription
providerNoProvider slug to filter sizes
region_idNoRegion ID - limits results to sizes available in that region
category_idNoSize category ID to filter by
server_idNoServer ID - returns sizes valid for resizing this server
kindNoFilter by size kind (e.g. shared, dedicated)
permanentNoSet to false for flexible resize options. Default: true
pageNoPage number (default: 1)
curl "https://dashboard.bithost.io/api/v1/sizes?provider=digital_ocean®ion_id=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Size object

FieldTypeDescription
idintegerUnique size identifier
namestringDisplay name
slugstringProvider-specific slug
pricefloatMonthly price in USD
price_per_hourstringHourly price in USD
windows_feefloatAdditional monthly fee for Windows images (Vultr only, 0.0 for others)
memoryintegerRAM in megabytes
processorstringCPU description (e.g. "2 vCPUs")
bandwidthintegerMonthly transfer allowance in gigabytes
diskintegerDisk size in gigabytes
kindstringInstance kind: shared or dedicated

Regions

Regions represent physical datacenter locations where servers can be deployed. Each region belongs to a single provider.

GET /api/v1/regions

Returns a paginated list of regions for a given provider. Each region includes an available_size_slugs array you can use to check which instance sizes can be deployed there.

ParameterRequiredDescription
providerYesProvider slug: digital_ocean, linode, hetzner, vultr
pageNoPage number (default: 1)
curl "https://dashboard.bithost.io/api/v1/regions?provider=digital_ocean" \
  -H "Authorization: Bearer YOUR_API_KEY"

Region object

FieldTypeDescription
idintegerUnique region identifier
namestringFull display name (e.g. "New York 1")
slugstringProvider-specific region slug (e.g. "nyc1")
originstringCity or geographic area (e.g. "New York")
numberintegerNumeric suffix distinguishing regions in the same city
available_size_slugsarraySize slugs that can be deployed in this region

Images

Images are the OS templates used when creating or rebuilding a server. Bithost supports three image types: STANDARD (stock OS images maintained by the provider), CUSTOM (provider-specific custom images), and SNAPSHOT (point-in-time snapshots you created from your own servers).

GET /api/v1/images

Returns a paginated list of available images for a provider. When type is SNAPSHOT, only snapshots owned by the authenticated user are returned.

ParameterRequiredDescription
providerYesProvider slug: digital_ocean, linode, hetzner, vultr
typeNoImage type: STANDARD (default), CUSTOM, or SNAPSHOT
architectureNoCPU architecture: x86 (default) or ARM
pageNoPage number (default: 1)
curl "https://dashboard.bithost.io/api/v1/images?provider=digital_ocean" \
  -H "Authorization: Bearer YOUR_API_KEY"
GET /api/v1/images/:id

Returns the details of a single image by ID. Returns a 404 with a not_found error if the image does not exist or has been disabled.

curl https://dashboard.bithost.io/api/v1/images/20 \
  -H "Authorization: Bearer YOUR_API_KEY"

Image object

FieldTypeDescription
idintegerUnique image identifier
namestringDisplay name (e.g. "Ubuntu 24.04 LTS")
distributionstringOS distribution family (e.g. "Ubuntu", "Debian")
windowsbooleanWhether the image is a Windows OS
architecturestringCPU architecture: x86 or arm
provider_idintegerID of the provider that owns this image

Interactive API explorer: dashboard.bithost.io/api/docs

Top up in crypto.
Be root in a minute.

No cards. No KYC. Uninterrupted service since 2014. For people who'd rather not explain why they need a server.

Deploy a server →