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
| Status | Meaning | When it occurs |
|---|---|---|
200 | Success | Request completed successfully |
401 | Unauthorized | Missing or invalid API key |
403 | Forbidden | Account not allowed to perform this action |
404 | Not Found | Resource does not exist |
422 | Unprocessable Entity | Validation or business-logic failure |
500 | Internal Server Error | Unexpected error on our end |
Error Codes
| Code | Description |
|---|---|
internal_error | Unexpected server error |
unauthenticated | Missing or invalid API key |
locked | Account is locked |
not_found | Requested resource does not exist |
busy | Resource is currently processing another operation |
insufficient_funds | Account balance is too low for this operation |
no_keys | No SSH keys are configured on the account |
quota_exceeded | Server limit for the account has been reached |
unconfirmed | Account email address has not been confirmed |
invalid_snapshot | Snapshot does not belong to the authenticated user |
blank | A required field was left empty |
invalid | A field value is not in the expected format |
taken | The value is already in use (duplicate) |
too_long | Value exceeds the maximum allowed length |
too_short | Value is shorter than the minimum required length |
not_a_number | A numeric value was expected |
confirmation | Confirmation 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
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
}
}
| Field | Type | Description |
|---|---|---|
email | string | Account email address |
full_name | string | Display name |
balance | float | Current account balance in USD |
server_limit | integer | Maximum 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
| Field | Type | Description |
|---|---|---|
id | integer | Unique server identifier |
name | string | Server hostname |
pending | boolean | Whether the server is processing an operation |
power | boolean | Whether the server is powered on |
cost_so_far | float | Accumulated cost in USD for the current billing period |
status | string | active, pending, or deleted |
backups_enabled | boolean | Whether automatic backups are enabled |
message | string or null | Status message (e.g. error details) |
ip_address | string or null | Primary public IPv4 address |
private_ip_address | string or null | Private IPv4 address |
ip_address_v6 | string or null | Public IPv6 address |
private_ip_address_v6 | string or null | Private IPv6 address |
provider | string | Provider slug: digital_ocean, linode, hetzner, vultr |
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"
Returns the details of a single server.
curl https://dashboard.bithost.io/api/v1/servers/123 \
-H "Authorization: Bearer YOUR_API_KEY"
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.
| Parameter | Required | Description |
|---|---|---|
name | Yes | Server hostname |
size_id | Yes | Instance size ID (see Sizes) |
region_id | Yes | Region ID (see Regions) |
image_id | Yes | OS image ID (see Images) |
provider | Yes | Provider slug: digital_ocean, linode, hetzner, vultr |
key_ids | No | Array of SSH key IDs to install on the server |
backups_enabled | No | Set to true to enable automatic backups |
terms | Yes | Must 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.
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"
Controls the power state of a server. Returns the updated server object.
| Parameter | Required | Description |
|---|---|---|
action_type | Yes | One of: on, off, reboot |
Enables or disables automatic backups. Returns the updated server object.
| Parameter | Required | Description |
|---|---|---|
automatic | Yes | true to enable backups, false to disable |
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.
| Parameter | Required | Description |
|---|---|---|
image_id | Yes | The ID of the OS image to install |
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.
| Parameter | Required | Description |
|---|---|---|
size_id | Yes | The ID of the target size |
permanent | No | true for a permanent disk resize. Default: false |
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.
| Parameter | Required | Description |
|---|---|---|
name | Yes | A label for the snapshot |
Clears the status message on a server. Useful after acknowledging an error or informational message. Returns the server object with message: null.
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.
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 } }
}
Adds a new SSH public key to your account. The key is passed inside a nested key object.
| Parameter | Required | Description |
|---|---|---|
key[label] | Yes | A human-readable label for the key |
key[key] | Yes | The 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.
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.
| Parameter | Required | Description |
|---|---|---|
provider | No | Provider slug to filter sizes |
region_id | No | Region ID - limits results to sizes available in that region |
category_id | No | Size category ID to filter by |
server_id | No | Server ID - returns sizes valid for resizing this server |
kind | No | Filter by size kind (e.g. shared, dedicated) |
permanent | No | Set to false for flexible resize options. Default: true |
page | No | Page 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
| Field | Type | Description |
|---|---|---|
id | integer | Unique size identifier |
name | string | Display name |
slug | string | Provider-specific slug |
price | float | Monthly price in USD |
price_per_hour | string | Hourly price in USD |
windows_fee | float | Additional monthly fee for Windows images (Vultr only, 0.0 for others) |
memory | integer | RAM in megabytes |
processor | string | CPU description (e.g. "2 vCPUs") |
bandwidth | integer | Monthly transfer allowance in gigabytes |
disk | integer | Disk size in gigabytes |
kind | string | Instance kind: shared or dedicated |
Regions
Regions represent physical datacenter locations where servers can be deployed. Each region belongs to a single provider.
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.
| Parameter | Required | Description |
|---|---|---|
provider | Yes | Provider slug: digital_ocean, linode, hetzner, vultr |
page | No | Page number (default: 1) |
curl "https://dashboard.bithost.io/api/v1/regions?provider=digital_ocean" \
-H "Authorization: Bearer YOUR_API_KEY"
Region object
| Field | Type | Description |
|---|---|---|
id | integer | Unique region identifier |
name | string | Full display name (e.g. "New York 1") |
slug | string | Provider-specific region slug (e.g. "nyc1") |
origin | string | City or geographic area (e.g. "New York") |
number | integer | Numeric suffix distinguishing regions in the same city |
available_size_slugs | array | Size 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).
Returns a paginated list of available images for a provider. When type is SNAPSHOT, only snapshots owned by the authenticated user are returned.
| Parameter | Required | Description |
|---|---|---|
provider | Yes | Provider slug: digital_ocean, linode, hetzner, vultr |
type | No | Image type: STANDARD (default), CUSTOM, or SNAPSHOT |
architecture | No | CPU architecture: x86 (default) or ARM |
page | No | Page number (default: 1) |
curl "https://dashboard.bithost.io/api/v1/images?provider=digital_ocean" \
-H "Authorization: Bearer YOUR_API_KEY"
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
| Field | Type | Description |
|---|---|---|
id | integer | Unique image identifier |
name | string | Display name (e.g. "Ubuntu 24.04 LTS") |
distribution | string | OS distribution family (e.g. "Ubuntu", "Debian") |
windows | boolean | Whether the image is a Windows OS |
architecture | string | CPU architecture: x86 or arm |
provider_id | integer | ID of the provider that owns this image |
Interactive API explorer: dashboard.bithost.io/api/docs