Skip to content

Get API key metadata API Reference

GET
/tenants/{tenant}/apikeys/{id}
curl --request GET \
--url https://api.kupe.cloud/api/v1/tenants/acme/apikeys/ak-a1b2c3d4 \
--header 'Authorization: <Authorization>'

Retrieve metadata for an API key (id, displayName, role, expiresAt, status). The raw kupe_… key value is never returned by this endpoint — that value is only available in the CreateAPIKey response. Admin only.

tenant
required
string

Tenant name

id
required
string

API key ID (ak- prefix)

API key metadata

Media type application/json
object
createdAt
string
createdBy
string
displayName
string
expiresAt
string
id
string
lastUsedAt
string
role
string
Example
{
"createdAt": "2026-03-15T08:00:00Z",
"createdBy": "alice@acme.com",
"displayName": "CI/CD Pipeline",
"expiresAt": "2027-01-01T00:00:00Z",
"id": "ak-a1b2c3d4",
"lastUsedAt": "2026-04-05T12:30:00Z",
"role": "admin"
}

Invalid API key ID format

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}

Missing or invalid authentication

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}

Admin access required

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}

API key not found

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}

Rate limit exceeded

Media type application/json
object
code
string
error
string
field
string
message
string
severity
string
Example generated
{
"code": "example",
"error": "example",
"field": "example",
"message": "example",
"severity": "example"
}