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

# API overview

> Base URLs, authentication, environments, response envelopes, and route groups.

The Onstacks API is a JSON HTTP API. It is organized around auth, workspace configuration, wallets, transfers, provider routing, and developer tooling.

Endpoint pages in the API sections are generated from `openapi.yaml`. They include parameters, request bodies, response schemas, auth requirements, and Mintlify's interactive API playground.

## Base URL

Local development:

```text theme={null}
https://api.onstacks.io
```

Production deployments provide an environment-specific base URL.

## Authentication

Protected routes use a workspace API key:

```http theme={null}
Authorization: Bearer <api_key>
```

Health checks do not require authentication.

## Environment scope

Environment-partitioned resources accept:

```text theme={null}
?environment=sandbox
```

Supported values are `sandbox` and `live`. The default is `sandbox`.

## Response envelope

Every JSON response includes:

| Field        | Description                                         |
| ------------ | --------------------------------------------------- |
| `data`       | Response payload, or `null` for errors.             |
| `error`      | Error details, or `null` for success.               |
| `request_id` | Request identifier for support and troubleshooting. |
