List API keys by prefix and last four
LogsGET /developer/api-keys
Returns the API keys that belong to the caller's context (the tenant, or the organization when no tenant is selected), one cursor page at a time. Keys are identified by prefix and last four characters; the secret is never returned again. Each key reports its computed status (for example active, expired or revoked). Requires developer:read.
Parameters
limitMaximum resources to return (default 20, maximum 100).
afterOpaque cursor returned by the previous page.
Returns
200 API keys
Show attributes
dataShow child attributes
idnamekindone of
secret,restrictedmodeone of
live,testprefixLeading characters shown in listings
last_fourscopesstatusone of
active,expired,revokedcreated_bycreated_atlast_used_atexpires_atrevoked_atrolled_from_idrolled_to_idallowed_ipsIPs or CIDRs the key may be used from; empty allows any
last_used_ipsecretThe full key; present only on the create and roll responses. Prefixes: sk_live_, sk_test_, sk_rlive_, sk_rtest_
has_morenext_cursor
Permissions developer:read · Roles: admin, owner
curl -X GET "$BUSINESS_API/developer/api-keys" \
-H "Authorization: Bearer sk_test_..."
# No matching CLI command; use cURL or direct HTTP.
const res = await fetch("$BUSINESS_API/developer/api-keys", {
method: "GET",
headers: {
Authorization: "Bearer sk_test_..."
}
});
const data = await res.json();
import requests
res = requests.get(
"$BUSINESS_API/developer/api-keys",
headers={
"Authorization": "Bearer sk_test_..."
}
)
data = res.json()
req, _ := http.NewRequest("GET", "$BUSINESS_API/developer/api-keys", nil)
req.Header.Set("Authorization", "Bearer sk_test_...")
resp, err := http.DefaultClient.Do(req)
{
"data": [
{
"id": "dev_2R5wU9D4kFDEuJVeYfxoK79EmHn",
"name": "Ana Matsinhe",
"kind": "secret",
"mode": "live",
"prefix": "sk_live_ab12",
"last_four": "last four",
"scopes": [
"scope"
],
"status": "active",
"created_by": "created by",
"created_at": "2026-11-19T09:30:00Z",
"last_used_at": "2026-11-19T09:30:00Z",
"expires_at": "2026-11-19T09:30:00Z",
"revoked_at": "2026-11-19T09:30:00Z",
"rolled_from_id": "rol_2t9WqfdsKVPYOb7QyPDqy1bSQfD",
"rolled_to_id": "rol_2wwXNOid16AhFeCFr2g7xCKL1Wc",
"allowed_ips": [
"allowed ip"
],
"last_used_ip": "last used ip",
"secret": "secret"
}
],
"has_more": true,
"next_cursor": "next cursor"
}