curl "https://api.sabaothcloud.com/api/v1/api-keys?organization_id=YOUR_ORG_ID" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"api_keys": [
{
"id": "6f1c2a7e-8a1d-4f53-9b0e-3c1d2e4f5a6b",
"name": "CI deploy key",
"key_prefix": "Qw8Rt2Lm",
"scopes": ["clusters:read", "clusters:write"],
"last_used_at": "2026-10-13T09:12:44Z",
"usage_count": 1284,
"expires_at": "2027-01-11T10:00:00Z",
"is_active": true,
"created_at": "2026-10-13T10:00:00Z"
}
],
"total": 1
}
API Keys
List API Keys
List the API keys in an organization
GET
/
api
/
v1
/
api-keys
curl "https://api.sabaothcloud.com/api/v1/api-keys?organization_id=YOUR_ORG_ID" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"api_keys": [
{
"id": "6f1c2a7e-8a1d-4f53-9b0e-3c1d2e4f5a6b",
"name": "CI deploy key",
"key_prefix": "Qw8Rt2Lm",
"scopes": ["clusters:read", "clusters:write"],
"last_used_at": "2026-10-13T09:12:44Z",
"usage_count": 1284,
"expires_at": "2027-01-11T10:00:00Z",
"is_active": true,
"created_at": "2026-10-13T10:00:00Z"
}
],
"total": 1
}
Returns active and revoked keys. The full key is never returned.
Query parameters
string
The organization to list keys for. Defaults to your current organization.
Response
200 OK
object[]
The keys.
Show properties
Show properties
string
The key’s ID.
string
The key’s name.
string
The 8 characters after
mpg_.string[]
The key’s scopes.
string | null
When the key was last used, or
null if never.integer
How many requests the key has made.
string | null
When the key expires, or
null if it never does.boolean
false once the key is revoked.string
When the key was created.
integer
The number of keys.
curl "https://api.sabaothcloud.com/api/v1/api-keys?organization_id=YOUR_ORG_ID" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"api_keys": [
{
"id": "6f1c2a7e-8a1d-4f53-9b0e-3c1d2e4f5a6b",
"name": "CI deploy key",
"key_prefix": "Qw8Rt2Lm",
"scopes": ["clusters:read", "clusters:write"],
"last_used_at": "2026-10-13T09:12:44Z",
"usage_count": 1284,
"expires_at": "2027-01-11T10:00:00Z",
"is_active": true,
"created_at": "2026-10-13T10:00:00Z"
}
],
"total": 1
}