curl --request GET \
--url https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/api-keys \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"id": "<string>",
"object": "knowledge_base.api_key",
"knowledge_base_id": "<string>",
"scope": "<string>",
"created_at": 123,
"name": "<string>",
"slug": "<string>",
"permissions": [
"<string>"
],
"prefix": "<string>",
"last_used_at": 123,
"expires_at": 123,
"created_by": "<string>",
"updated_at": 123
}
],
"total": 1,
"page": 2,
"limit": 50,
"has_more": true
}List API keys
Secrets are never included. Requires admin+ (or owner).
curl --request GET \
--url https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/api-keys \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/api-keys"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"id": "<string>",
"object": "knowledge_base.api_key",
"knowledge_base_id": "<string>",
"scope": "<string>",
"created_at": 123,
"name": "<string>",
"slug": "<string>",
"permissions": [
"<string>"
],
"prefix": "<string>",
"last_used_at": 123,
"expires_at": 123,
"created_by": "<string>",
"updated_at": 123
}
],
"total": 1,
"page": 2,
"limit": 50,
"has_more": true
}Authorizations
User session JWT or instance API key (iak_*). Send as Authorization: Bearer <token>.
Path Parameters
Knowledge base id. Legacy physical prefix vs_ (the kb_ rename is deferred).
128^vs_[A-Za-z0-9-]+$Query Parameters
Page size. Server clamps to [1, 100] silently.
1 <= x <= 1001-based page number.
x >= 1Response
Paginated API keys (no secrets).
Shared list-response envelope. Array is always data. Every
element carries its own object discriminator.
list Hide child attributes
Hide child attributes
The key slug (also exposed as slug).
^kb-[A-Za-z0-9_-]+$knowledge_base.api_key ^vs_[A-Za-z0-9-]+$Currently storage:vector_stores:{knowledge_base_id} (the
storage:knowledge_bases:{id} rename is deferred with the
platform allowlist change).
256Path-safe key identifier (kb-{knowledge_base_id}-{uuid}, or
caller-supplied at mint). Equal to id.
The storage:-prefixed permission strings the key grants
(caller-provided at mint, else config.api_key_default_permissions).
Non-secret leading characters, for identification in lists.
x >= 0x >= 11 <= x <= 100Was this page helpful?