---
title: "List the current user's API keys (key value never returned)."
method: GET
path: "/api/v1/api-keys"
tags: ["api-keys"]
---

# List the current user's API keys (key value never returned).

`GET /api/v1/api-keys`

Cookie session only; uses createClient from @/lib/supabase/server + getUser, never inspects the Authorization header, so a pm_live_ Bearer token is NOT accepted. Lists keys for the authenticated user (eq user_id), sorted created_at DESC. The raw key is never returned — only keyPrefix. If admin client unavailable or api_keys table missing (code 42P01), returns 200 with { keys: [], count: 0, message }.

## Response `200`

Keys returned (or empty list with a 'message' field if SUPABASE_SERVICE_ROLE_KEY/the api_keys table is not configured).

- object

## Other responses

- `401` — No valid session cookie (rejects API keys — this route does NOT call authenticateApiRoute).
- `429` — Rate limit exceeded (apiKeysRead bucket, 120/h).
- `500` — DB or internal error.

---

[API](https://skmtc.dev/pathmode/apis/pathmode-api.md) · [All operations](https://skmtc.dev/pathmode/apis/pathmode-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pathmode/pathmode-api/revisions/e419abb0a327/schema)
