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

# GET /api-keys

`GET /api-keys`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/api-keys`
- Auth: HTTP bearer

## Query parameters

- `page` integer
- `page_size` integer

## Response `200`

API keys retrieved successfully

- ApiKeyListResponse
  - `api_keys` ApiKeyResponse[], required
    - `created_at` string, date-time, required
    - `environment_id` integer, nullable
    - `expires_at` string, date-time, nullable
    - `id` integer, required
    - `is_active` boolean, required
    - `key_prefix` string, required
    - `last_used_at` string, date-time, nullable
    - `name` string, required
    - `permissions` string[], nullable
    - `project_id` integer, nullable: Immutable optional deployment resource scope.
    - `role_type` string, required
  - `total` integer, required

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `500`: Internal server error

## Changes

- **2026-11-16** `eb31063c55e2`: 2 info
  - added the optional property `api_keys/items/environment_id` to the response with the `200` status
  - added the optional property `api_keys/items/project_id` to the response with the `200` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/api-keys/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
