Skip to main content
GET
Get API Key

Overview

Returns the metadata for a single API key. The raw key secret is never returned; only the prefix (the first 12 characters of the key) is included, for identification. The full secret is shown once, when the key is created or rotated. Revoked and expired keys are still retrievable here so audit history stays intact; check the status field. Requires the api-keys:manage scope.

Path Parameters

id
string
required
API key ID (key_...).

Response

id
string
API key ID.
object
string
Always api_key.
name
string
Human-readable name.
prefix
string
First 12 characters of the raw key, for identification. The full secret is never returned.
scopes
string[]
Scopes granted to this key.
rate_limit_tier
string
Rate limit tier label for the key.
status
string
Lifecycle state: active, expired, or revoked.
expires_at
string | null
Expiry timestamp, or null for a non-expiring key.
last_used_at
string | null
Timestamp of the last API call with this key, or null if never used.
metadata
object
Key-value metadata.
revoked_at
string | null
Revocation timestamp, or null.
created_by
string
ID of the API key that created this key.
created_at
string
Creation timestamp.
updated_at
string
Last update timestamp.
request_id
string
Unique request identifier for support and debugging.

Code Examples

Errors