Get All API Keys
GET
/v1/api-keysRetrieve all API keys associated with the authenticated account.
About API Key Management
This endpoint returns a list of all API keys associated with your account. Each API key entry includes metadata such as name, scopes, status, and usage information. This is useful for managing and monitoring your API keys.
Key Information:
- Key Identification: Each key has a unique
key_idand optional name - Permissions: View the scopes (permissions) assigned to each key
- Status Tracking: Monitor which keys are active or inactive
- Usage Monitoring: See when each key was last used
- Expiration: Check expiration dates for keys that have them
Request History
Log in to see full request history
| TIME | STATUS | USER AGENT |
|---|---|---|
| Make a request to see history. | ||
0 Requests This Month
Request Example
shell
curl -X GET https://api.konpro.ai/v1/api-keys \
-H "x-api-key: <your-api-key>" \
-H "Content-Type: application/json"Response
| Field | Type | Description |
|---|---|---|
| api_keys | array | Array of API key objects. Each object contains the API key details and metadata. |
API Key Object
| Field | Type | Description |
|---|---|---|
| key_id | string | Unique identifier for the API key (e.g., key-001) |
| name | string | Optional name or label for the API key (e.g., "Production Key") |
| scopes | array | Array of permission scopes granted to the API key (e.g., ["read", "write"]) |
| last_used | string | ISO 8601 timestamp of when the API key was last used. May be null if never used. |
| created_at | string | ISO 8601 timestamp of when the API key was created |
| expires_at | string | ISO 8601 timestamp of when the API key expires. If null, the key does not expire. |
| status | string | Current status of the API key (e.g., active or inactive) |
Sample Successful Response
json
{
"api_keys": [
{
"key_id": "key-001",
"name": "Production Key",
"scopes": ["read", "write"],
"last_used": "2024-01-01T00:00:00Z",
"created_at": "2024-01-01T00:00:00Z",
"expires_at": "2024-12-31T23:59:59Z",
"status": "active"
}
]
}Notes
- This endpoint requires authentication using the
x-api-keyheader. - This endpoint does not require any query parameters - it returns all API keys associated with your account.
- Only API keys that belong to your account are returned.
- The response does not include the actual API key values for security reasons - only metadata about the keys.
- Use the
statusfield to identify which keys are currently active. - The
last_usedfield helps you identify unused keys that may be candidates for deletion. - If
expires_atisnull, the API key does not have an expiration date. - For error descriptions, see Error Responses.