{ "opencollection": "1.0.0", "info": { "name": "Kernel API Keys API", "version": "0.1.0" }, "request": { "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "items": [ { "info": { "name": "API Keys", "type": "folder" }, "items": [ { "info": { "name": "List API keys", "type": "http" }, "http": { "method": "GET", "url": "https://api.onkernel.com/org/api_keys", "params": [ { "name": "limit", "value": "", "type": "query", "description": "Maximum number of results to return" }, { "name": "offset", "value": "", "type": "query", "description": "Number of results to skip" }, { "name": "query", "value": "", "type": "query", "description": "Case-insensitive substring match against API key name, creator, and project. API key identifiers and masked keys match by exact value or prefix." }, { "name": "name", "value": "", "type": "query", "description": "Exact-match filter on API key name using the database collation. In production, matching is case- and accent-insensitive. Names are not required to be unique, so multiple keys may match. When status=all or include_deleted=true is set, soft-deleted keys with the same name may also match." }, { "name": "sort_by", "value": "", "type": "query", "description": "Field to sort API keys by." }, { "name": "sort_direction", "value": "", "type": "query", "description": "Sort direction for API keys." }, { "name": "status", "value": "", "type": "query", "description": "Filter API keys by status. \"active\" returns keys that are not deleted (default; expired-but-not-deleted keys are still included), \"deleted\" returns only soft-deleted keys, \"all\" returns both." }, { "name": "include_deleted", "value": "", "type": "query", "description": "Deprecated: use status=all instead. When true, include deleted (soft-deleted) API keys in the results for audit purposes." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "List API keys for the authenticated organization. API keys are masked." }, { "info": { "name": "Create an API key", "type": "http" }, "http": { "method": "POST", "url": "https://api.onkernel.com/org/api_keys", "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Create a new API key within the authenticated organization." }, { "info": { "name": "Get an API key", "type": "http" }, "http": { "method": "GET", "url": "https://api.onkernel.com/org/api_keys/:id", "params": [ { "name": "id", "value": "", "type": "path", "description": "API key ID" }, { "name": "include_deleted", "value": "", "type": "query", "description": "When true, return the API key even if it has been deleted (soft-deleted), for audit purposes. Defaults to false, which returns 404 for a deleted key." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Retrieve an API key by ID for the authenticated organization. API keys are masked." }, { "info": { "name": "Update an API key", "type": "http" }, "http": { "method": "PATCH", "url": "https://api.onkernel.com/org/api_keys/:id", "params": [ { "name": "id", "value": "", "type": "path", "description": "API key ID" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Update an API key's name." }, { "info": { "name": "Delete an API key", "type": "http" }, "http": { "method": "DELETE", "url": "https://api.onkernel.com/org/api_keys/:id", "params": [ { "name": "id", "value": "", "type": "path", "description": "API key ID" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Delete an API key. A key cannot delete itself; use a different key to delete this one." }, { "info": { "name": "Rotate an API key", "type": "http" }, "http": { "method": "POST", "url": "https://api.onkernel.com/org/api_keys/:id/rotate", "params": [ { "name": "id", "value": "", "type": "path", "description": "API key ID" } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Rotate an API key. Issues a new key that copies the name and project of the rotated key, and schedules the rotated key to expire after a grace period so in-flight callers can swap over. The new plaintext key is returned once." } ] } ], "bundled": true }