---
title: "Get API key"
method: POST
path: "/public/v1/query/get_api_key"
tags: ["API keys"]
---

# Get API key

`POST /public/v1/query/get_api_key`

Get details about an API key.

## Request body

- V1GetApiKeyRequest
  - `organizationId` string, required — Unique identifier for a given organization.
  - `apiKeyId` string, required — Unique identifier for a given API key.

## Response `200`

A successful response.

- V1GetApiKeyResponse
  - `apiKey` V1ApiKey, required
    - `credential` Externaldatav1Credential, required
      - `publicKey` string, required — The public component of a cryptographic key pair used to sign messages and transactions.
      - `type` 'CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR' | 'CREDENTIAL_TYPE_API_KEY_P256' | 'CREDENTIAL_TYPE_RECOVER_USER_KEY_P256' | 'CREDENTIAL_TYPE_API_KEY_SECP256K1' | 'CREDENTIAL_TYPE_EMAIL_AUTH_KEY_P256' | 'CREDENTIAL_TYPE_API_KEY_ED25519' | 'CREDENTIAL_TYPE_OTP_AUTH_KEY_P256' | 'CREDENTIAL_TYPE_READ_WRITE_SESSION_KEY_P256' | 'CREDENTIAL_TYPE_OAUTH_KEY_P256' | 'CREDENTIAL_TYPE_LOGIN', required
    - `apiKeyId` string, required — Unique identifier for a given API Key.
    - `apiKeyName` string, required — Human-readable name for an API Key.
    - `createdAt` Externaldatav1Timestamp, required
      - `seconds` string, required
      - `nanos` string, required
    - `updatedAt` Externaldatav1Timestamp, required
      - `seconds` string, required
      - `nanos` string, required
    - `expirationSeconds` string, uint64 — Optional window (in seconds) indicating how long the API Key should last.

## Other responses

- `default` — An unexpected error response.

---

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