---
title: "List API keys"
method: GET
path: "/v1/keys"
tags: ["keys"]
---

# List API keys

`GET /v1/keys`

Scope: `keys` (always opt-in). Scoped to the CALLING key's mode: a sandbox (sk-coasty-test-*) key sees only sandbox keys, a live key sees live plus legacy. Each item carries `key_kind` so you can tell them apart. A key-store outage returns 503 DB_UNAVAILABLE with Retry-After rather than a bare 500.

## Response `200`

Keys.

- object
  - `keys` APIKeyListItem[]
    - `key_id` string, required
    - `name` string, required
    - `tier` string, required
    - `scopes` string[], required
    - `created_at` string, date-time, required
    - `last_used_at` string, date-time, nullable
    - `key_prefix` string, required — Stored 16-character identification prefix; never the full secret.
    - `key_kind` 'live' | 'test' | 'legacy', nullable — Which prefix family this key belongs to: `live` (sk-coasty-live-*), `test` (sk-coasty-test-*, sandbox, never bills), or `legacy` (minted before the split; behaves as live). The listing is scoped to the CALLING key's own mode, so a sandbox key only ever sees sandbox keys and a live key sees live plus legacy.

## Other responses

- `400` — Invalid request body or parameters.
- `401` — Missing, invalid, or revoked API key. Pass `X-API-Key: sk-coasty-live-...` (or test).
- `403` — API key lacks the required scope or tier-feature is unavailable on the caller's plan.
- `404` — Resource not found in this key's namespace.
- `409` — The resource state conflicts with this operation.
- `413` — The request body exceeds the endpoint limit.
- `422` — The JSON shape is valid but one or more values violate the endpoint contract.
- `429` — Rate or concurrency limit exceeded.
- `500` — Unexpected server error. Retry with exponential backoff.
- `502` — An upstream dependency returned an invalid response.
- `503` — A required service is temporarily unavailable.
- `504` — An upstream dependency timed out.

---

[API](https://skmtc.net/coasty/apis/coasty-public-api.md) · [All operations](https://skmtc.net/coasty/apis/coasty-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coasty/coasty-public-api/versions/f50d93b0d8a1/schema)
