---
title: Overview
description: Choose the right credential and explore the Cloud API
keywords: ["cloud API", "REST API", "API keys", "personal access tokens", "endpoint reference"]
icon: "book-open"
---

<Note>
  microsandbox cloud is in [private beta](/cloud/overview); the API is available to organizations with access.
</Note>

The microsandbox cloud REST API manages sandboxes and the accounts around them. Use it directly when an SDK does not cover your workflow, or when you need account, billing, or audit endpoints.

For running code in sandboxes (exec, streaming, PTY, file transfer, SSH), use the [SDKs](/sdk/overview) or [CLI](/cli/overview). They speak the sandbox command channel, which is not part of this REST surface.

## Credentials

The sidebar separates endpoints by who the request represents:

| Credential | Format | Represents | Use for |
| --- | --- | --- | --- |
| API key | `msb_...` | An organization | Services, SDKs, CLI automation, and organization resources |
| Personal token | `msb_pat_...` | A user | Account and organization administration |

API keys and personal tokens are both sent as bearer tokens:

```bash
curl https://api.microsandbox.dev/v1/sandboxes \
  -H "Authorization: Bearer $MSB_API_KEY"
```

API keys are created in the [dashboard](https://dashboard.microsandbox.dev/access/api-keys). API-key paths infer the organization from the key. Personal-token paths include the organization slug when the request needs an organization.

## Base URL

```text
https://api.microsandbox.dev
```

## Errors

Errors return an `error` object with a stable machine-readable `code`, a human-readable `message`, and optional structured `details`:

```json
{
  "error": {
    "code": "invalid_api_key",
    "message": "unauthorized",
    "details": null
  }
}
```

## Pagination

List endpoints use cursor pagination. Pass `limit` to size the page and `cursor` to continue from a previous response:

```json
{
  "data": [ ... ],
  "has_more": true,
  "next_cursor": "eyJv..."
}
```

Request the next page with `?cursor=<next_cursor>`; `has_more: false` means you have everything.

## Usage and billing

The usage endpoints report metered consumption for the current period. Reported cost figures are estimates; the [dashboard](https://dashboard.microsandbox.dev/billing) is the source of truth for billing.
