---
title: "List service account API keys"
method: GET
path: "/service_accounts/{clientId}/api_keys"
tags: ["service_accounts"]
---

# List service account API keys

`GET /service_accounts/{clientId}/api_keys`

Returns all long-lived API keys created for a service account. API keys provide an alternative to OAuth for simpler authentication scenarios.

## Response `200`

successful operation

- ApiKey[]
  - `createdAt` string — The date and time when the resource was created
  - `updatedAt` string — The date and time when the resource was updated
  - `createdBy` string — The user or service account who created the resource
  - `updatedBy` string — The user or service account who updated the resource
  - `apiKey` string — Api key
  - `expires_in` string — Duration until expiration. Supports formats like '30d' (30 days), '24h' (24 hours), '1w' (1 week). If not set, the API key never expires.
  - `id` string — Api key id, to retrieve it from the API
  - `name` string — Name for the API key
  - `sub` string — User subject identifier
  - `sub_type` string — Subject type (user or service_account)

---

[API](https://skmtc.net/blaxel/apis/blaxel-control-plane.md) · [All operations](https://skmtc.net/blaxel/apis/blaxel-control-plane/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/blaxel/blaxel-control-plane/revisions/dfa264bc72ee/schema)
