---
title: "View API keys"
method: GET
path: "/accounts/api-keys"
tags: ["API Keys"]
---

# View API keys

`GET /accounts/api-keys`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/accounts/api-keys`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/docs/accounts/api-keys/get.ts> (a function with typed inputs; its response is checked against the schema)

Lists the metadata of the API keys that belong to the current session's account. Users see their own user keys and the account's shared keys. Root and administrators can list another user's keys with `email`. The key itself is never returned. Keys of the user's other accounts are not listed: sign in to that account to see them.

## Query parameters

- `email` string, email

## Response `200`

API keys retrieved successfully

- object
  - `data` ViewApiKey[], required
    - `id` string
    - `name` string
    - `last_4_characters` string
    - `created_on` string, date-time
    - `expires_on` string, date-time
    - `account` string: Account name
    - `account_id` string
    - `user_id` string
    - `scope` 'user' | 'account'
    - `allow_endpoints` ApiKeyEndpoint[]
      - `method` string, required: HTTP method
      - `path` string, required: HTTP path
      - `gateway_id` string
      - `subjects` string[]: Subjects allowed on the request body
    - `permissions` object

## Other responses

- `401`: Unauthorized

## Changes

- **2026-11-12** `700eb1ace61a`: 5 info
  - added the optional property `data/items/account_id` to the response with the `200` status
  - added the optional property `data/items/allow_endpoints` to the response with the `200` status
  - added the optional property `data/items/permissions` to the response with the `200` status
  - added the optional property `data/items/scope` to the response with the `200` status
  - …1 more
- **2025-06-12** `4979dfd00eda`: 1 breaking, 1 info
  - the response's body type changed from `array` to `object` for status `200`
  - added the required property `data` to the response with the `200` status

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/changes/accounts/api-keys/get.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/revisions/700eb1ace61a?raw)
