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

# List API keys

`GET /v1/api-keys`

## Request

- Base URL: `https://api.postzen.dev`
- URL: `https://api.postzen.dev/v1/api-keys`
- Auth: HTTP bearer

Returns the API keys for the authenticated account. The full key value is never returned; only a masked `keyPreview` is shown. Read-only and read-write API keys are accepted.

## Response `200`

API keys returned.

- ApiKeysListResponse
  - `apiKeys` ApiKey[], required
    - `id` string, required: API key id.
    - `name` string, required: Human-readable label.
    - `keyPreview` string, required: Masked preview of the key, for example `pzn_live_a1b2c3d4e...`. The full key is never retrievable after creation.
    - `createdAt` string, date-time, required
    - `lastUsedAt` string, date-time, nullable, required: Last time the key authenticated a request, or `null` if it has never been used.
    - `scope` 'full' | 'profiles', required: `full` grants access to all profiles; `profiles` restricts the key to `profileIds`.
    - `profileIds` ApiKeyProfileRef[], required: Profiles the key is restricted to. Empty for full-scope keys.
      - `_id` string, required: PostZen profile id.
      - `name` string, required
      - `color` string, required: Hex color in `#rrggbb` format.
    - `permission` 'read-write' | 'read', required: `read` keys may only call `GET` endpoints; `read-write` keys may call every endpoint.

## Other responses

- `401`: Missing or invalid API key.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/postzen/apis/postzen-public-api.md) · [All operations](https://skmtc.dev/postzen/apis/postzen-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postzen/apis/postzen-public-api/revisions/40863e3710ec?raw)
