Skip to content

TEE Docker API reference

Base URL, authentication, error shape, request tracing, and the full route list — the conventions every endpoint shares, plus the one call that needs no credentials.

Updated View as Markdown

Everything shared by every endpoint lives here — base URL, authentication, the error shape, and the full route list — so the per-resource pages can stay short.

Base URL

Examples on this page use $API_URL. Set it once, with the /v1 prefix included — every route lives under it:

export API_URL=https://<your-api-host>/v1

Every route is prefixed with /v1, and request bodies are JSON needing content-type: application/json. Every example across this reference uses $API_URL, so set it once as above.

Authentication

Three tiers, plus GET /v1/health, which takes no credentials at all. Which tier a route takes is stated on every endpoint.

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

Used by six routes: workspace create, list, and delete; quota; token mint; and scoped API-key mint. Missing or wrong credentials return 401 with bad_api_key.

-H "Authorization: Bearer $TOKEN"

Used by every other route. $TOKEN is a workspace token or a durable scoped API key — both carry the workspace in their own claim, so no route on this tier takes a :workspace path parameter, and a path and a token can never disagree.

-H "X-Admin-Key: $ADMIN_KEY"

Four routes — raising a tenant’s limits, plus read-only diagnostics, activity, and metrics. A missing or invalid key returns 401 with admin_denied.

Scopes

Most 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.

Five routes are deliberately exempt and accept any token whatever scopes it carries: token refresh and revoke, account lock and unlock, and token introspection (whoami).

Error shape

Every error, from every route, has one shape:

{
  "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.

Some codes add an optional error.details object alongside those four fields. It is opt-in per code rather than universal, so treat it as absent unless the code’s own documentation says otherwise.

The full catalog of codes, grouped by status, is on the Errors page.

Request tracing

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

-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
204 Success, no body — deletes, lock, unlock, token revoke
4xx Your request; see the code
5xx The service

Response headers

Two headers carry information back. They are also the only two exposed to cross-origin script, so a browser client can read these and nothing else.

Header When
x-request-id Always. Your id when it was accepted, a generated one otherwise
retry-after On a rate-limited 429 that carries a wait hint: token mint, workspace creation, workspace recreation cooldown, account unlock, and super-admin requests. Seconds, at least 1

The endpoints

Health lives on this page, under Check health. Every other resource has its own reference page:

Page Covers
Auth Mint, refresh, and revoke tokens
API keys Mint and introspect durable scoped API keys
Workspaces Tenant-tier workspace administration and quota
Workspace Current workspace, account listing, assets, lock and unlock
Accounts Accounts, wallets, addresses, tags
Networks Network list (read-only)
Sign Message, typed-data, digest, and bytes signing
Export Sealed mnemonic and private-key export
Admin Super-admin: raise limits; read diagnostics, activity, metrics

Every route

This is the whole published surface — thirty-six routes, and nothing else is served. Token means a workspace token or a scoped API key; the scope column names the scope it must carry. Admin means the super-admin X-Admin-Key.

Route Auth Scope
GET /v1/health none —
POST /v1/auth/token tenant —
POST /v1/auth/token/refresh token any
DELETE /v1/auth/token token any
POST /v1/auth/api-key tenant —
GET /v1/auth/whoami token any
GET /v1/workspaces tenant —
POST /v1/workspaces tenant —
DELETE /v1/workspaces/{slug} tenant —
GET /v1/quota tenant —
GET /v1/workspace token read
GET /v1/workspace/assets token read
GET /v1/workspace/networks token read
GET /v1/accounts token read
GET /v1/accounts/{slug} token read
POST /v1/accounts/{slug}/lock token any
POST /v1/accounts/{slug}/unlock token any
POST /v1/accounts token write
DELETE /v1/accounts/{slug} token write
POST /v1/accounts/{slug}/wallets token write
POST /v1/accounts/{slug}/wallets/import token write
POST /v1/accounts/{slug}/wallets/allocate token write
POST /v1/accounts/{slug}/wallets/seed-allocated token write
GET /v1/accounts/{slug}/wallets token read
GET /v1/accounts/{slug}/wallets/{id}/addresses token read
PUT /v1/accounts/{slug}/wallets/{id}/tags token write
POST /v1/sign/message token sign
POST /v1/sign/typed-data token sign
POST /v1/sign/digest token sign
POST /v1/sign/bytes token sign
POST /v1/accounts/{slug}/export token export
POST /v1/accounts/{slug}/wallets/{id}/export token export
GET /v1/admin/diagnostics admin —
GET /v1/admin/activity admin —
GET /v1/admin/metrics admin —
POST /v1/admin/tenants/{id}/limits admin —

Check health

Liveness only. No authentication.

GET /v1/health

curl "$API_URL/health"
{ "status": "ok" }

A healthy service answers 200. Anything else — a connection failure, a non-200, or a body that is not {"status":"ok"} — means the instance is not ready to serve. During a graceful shutdown it answers 503 with {"status":"shutting_down"} — a distinct, expected drain state, not a crash, so a probe can tell the two apart.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close