---
title: "TEE Docker API reference"
description: "Base URL, authentication, error shape, and request tracing — the conventions every endpoint shares."
---

> Documentation Index
> Fetch the complete documentation index at: https://tee.hypetrade.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# TEE Docker API reference

Everything shared by every endpoint lives here, so the per-resource pages can
stay short.

## Base URL

```
https://tee-api.hypetrade.xyz/v1
```

Every route is prefixed with `/v1`. Request bodies are JSON and need
`content-type: application/json`.

## Authentication

Two tiers. Which one a route takes is stated on every endpoint.

### Tenant

```bash
-H "X-Api-Key: $API_KEY" -H "X-Api-Secret: $API_SECRET"
```

Used by exactly five routes: workspace create, list, and delete; quota; and
token mint. Missing or wrong credentials return `401` with `bad_api_key`.
### Workspace token

```bash
-H "Authorization: Bearer $TOKEN"
```

Used by everything else. The workspace comes from the token's own claim —
**no route on this tier takes a `:workspace` path parameter**, so a path and a token can
never disagree.

## Scopes

Workspace-token routes additionally require a scope: `read`, `write`, `sign`,
or `export`. A valid token used outside its scopes returns `403` with
`scope_denied`. See [Scopes and permissions](/concepts/scopes/).

## Error shape

Every error, from every route, has one shape:

```json
{
  "error": {
"code": "account_not_found",
"message": "…",
"status": 404,
"requestId": "…"
  }
}
```

Branch on **`error.code`**, never on `message` — messages are for humans and may
change. Keep `requestId` when reporting a problem to your operator.

The full catalog of codes, grouped by status, is on the [Errors](/errors/) page.

## Request tracing

Send your own correlation id and it will be echoed back:

```bash
-H "X-Request-ID: my-trace-id-123"
```

Accepted when it is 1–128 characters of letters, digits, dots, underscores, or
hyphens. If it is missing or unsafe, the service generates a safe one instead.
Either way the id appears in the response header and in `error.requestId`.

## Status codes

| Status | Meaning here |
|---|---|
| `200` | Success with a body |
| `201` | Created — workspaces, tokens, accounts, wallets |
| `202` | Accepted for submission, not confirmed — transaction send only |
| `204` | Success, no body — deletes, lock, unlock, token revoke |
| `4xx` | Your request; see the code |
| `5xx` / `502` / `504` | The service or an upstream RPC endpoint |

`x-rpc-source` is stamped on chain-touching responses, naming which endpoint
tier served the call — see [Networks and RPC](/concepts/networks-and-rpc/).

## The endpoints

| Page | Covers |
|---|---|
| [Health](/api/health/) | Liveness |
| [Auth](/api/auth/) | Mint, refresh, revoke tokens |
| [Workspaces](/api/workspaces/) | Tenant-tier workspace administration and quota |
| [Workspace](/api/workspace/) | Current workspace, account listing, assets, lock and unlock |
| [Accounts](/api/accounts/) | Accounts, wallets, addresses, tags |
| [Networks](/api/networks/) | Network list and RPC endpoint registration |
| [Sign](/api/sign/) | Message and typed-data signing |
| [Transactions](/api/transactions/) | Build, simulate, send, status |
| [Addresses](/api/addresses/) | Balance lookup (not available in this release) |
| [Export](/api/export/) | Sealed mnemonic and private-key export |

Source: https://tee.hypetrade.xyz/api/index.mdx
