> ## Documentation Index
> Fetch the complete documentation index at: https://docs.servbase.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Servbase API

> Automate Servbase from scripts and CI: deploy and control apps, manage databases and object storage, and read your credit balance over HTTPS with scoped API keys.

> [!NOTE]
>
> The Servbase API is in beta. Endpoints and fields documented here are stable for integrations, and changes are announced in the [changelog](https://docs.servbase.net/reference/changelog.md).

## What you can do

> [card] [Applications](https://docs.servbase.net/api/applications.md)
>
> List apps, read deployments and build logs, deploy, rebuild, restart, stop and start.

> [card] [Databases](https://docs.servbase.net/api/databases.md)
>
> List databases and users, create and delete databases, rotate passwords, read credentials.

> [card] [Object storage](https://docs.servbase.net/api/object-storage.md)
>
> Create buckets, upload, list, download and delete objects.

> [card] [Billing](https://docs.servbase.net/api/billing.md)
>
> Read the workspace's credit balance, renewals and credit history.

## Base URL

All requests go to:

```text theme={null}
https://api.servbase.net
```

Requests and responses use JSON unless an endpoint says otherwise (object uploads and downloads use the file's own content type). Every request must use HTTPS.

## Quick start

**1. Create an API key**

In the dashboard, open **API** in the sidebar and select **Create API key**. Give it only the scopes it needs, for example `apps:read` and `apps:deploy`, and limit it to the apps it should reach. The full key is shown once: store it in a password manager or your CI secrets. See [Authentication](https://docs.servbase.net/api/authentication.md).

**2. Make your first request**

Send the key as a bearer token:

```bash cURL theme={null}
export SERVBASE_API_KEY="sbk_..."
curl https://api.servbase.net/app/list \
  -H "Authorization: Bearer $SERVBASE_API_KEY"
```

```javascript JavaScript theme={null}
const res = await fetch("https://api.servbase.net/app/list", {
  headers: { Authorization: `Bearer ${process.env.SERVBASE_API_KEY}` },
});
if (!res.ok) throw new Error(`Servbase API error ${res.status}`);
const { items } = await res.json();
console.log(items.map((app) => `${app.name} ${app.state}`));
```

```python Python theme={null}
import os, requests

res = requests.get(
    "https://api.servbase.net/app/list",
    headers={"Authorization": f"Bearer {os.environ['SERVBASE_API_KEY']}"},
    timeout=30,
)
res.raise_for_status()
for app in res.json()["items"]:
    print(app["name"], app["state"])
```

**3. Deploy from CI**

Follow [Deploy from CI](https://docs.servbase.net/api/deploy-from-ci.md) to deploy an app on every push and fail the pipeline when the build fails.

## Conventions

| Topic | Behavior |
| - | - |
| Authentication | `Authorization: Bearer <key>` on every request. See [Authentication](https://docs.servbase.net/api/authentication.md). |
| Workspace | A key works only in the workspace it was created in. No workspace header is needed. |
| IDs | Apps, databases and buckets are identified by UUIDs, shown in the dashboard and returned by the list endpoints. |
| Timestamps | ISO 8601 in UTC, for example `2026-11-15T08:30:00`. Chart data uses Unix seconds (`ts`). |
| Errors | A JSON body with `detail` and a stable `error_code`. See [Errors and limits](https://docs.servbase.net/api/errors.md). |
| Rate limit | 600 requests per minute per key. |
| Pagination | Page-based for apps and credit history, cursor-based for deployments and objects. See [Errors and limits](https://docs.servbase.net/api/errors.md#pagination). |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.