For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • GETGet API key permission options
      • GETList API keys
      • POSTCreate API key
      • GETGet aggregate API key analytics
      • GETReveal test key plaintext
      • GETGet API key
      • PUTUpdate API key
      • DELDelete API key
      • POSTRegenerate API key
      • GETGet API key analytics
Dashboard
LogoLogo
Runtype APIAPI Keys

Get aggregate API key analytics

GET
/v1/api-keys/analytics
GET
/v1/api-keys/analytics
$curl https://api.runtype.com/v1/api-keys/analytics \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json"
1{
2 "analytics": {
3 "totalKeys": 5,
4 "activeKeys": 3,
5 "expiredKeys": 2,
6 "keyBreakdown": [
7 {
8 "id": "a1b2c3d4-e5f6-7890-ab12-cd34ef567890",
9 "name": "Primary API Key",
10 "keyPrefix": "runtype_1234",
11 "lastUsedAt": "2024-04-20T14:45:00Z",
12 "isActive": true
13 },
14 {
15 "id": "b2c3d4e5-f678-9012-ab34-cd56ef789012",
16 "name": "Backup Key",
17 "keyPrefix": "runtype_5678",
18 "lastUsedAt": "2024-03-10T08:15:00Z",
19 "isActive": true
20 },
21 {
22 "id": "c3d4e5f6-7890-1234-ab56-cd78ef901234",
23 "name": "Staging Key",
24 "keyPrefix": "runtype_9012",
25 "lastUsedAt": "2024-02-28T17:00:00Z",
26 "isActive": true
27 },
28 {
29 "id": "d4e5f678-9012-3456-ab78-cd90ef123456",
30 "name": "Old Key 1",
31 "keyPrefix": "runtype_3456",
32 "lastUsedAt": null,
33 "isActive": false
34 },
35 {
36 "id": "e5f67890-1234-5678-ab90-cd12ef345678",
37 "name": "Old Key 2",
38 "keyPrefix": "runtype_7890",
39 "lastUsedAt": "2023-12-15T11:30:00Z",
40 "isActive": false
41 }
42 ]
43 },
44 "timestamp": "2024-04-25T12:00:00Z"
45}
Summary analytics across all of the authenticated user's API keys. Detailed usage counts live in Analytics Engine and must be queried separately.
Was this page helpful?
Previous

Reveal test key plaintext

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Response

Analytics summary
analyticsobject
timestampdatetime

Errors

401
Unauthorized Error
500
Internal Server Error