List API keys
Returns the organization's API keys, newest first, filterable by namespace (`namespaceId`), status and a search term matched against name and description.
GET
Returns the organization's API keys, newest first, filterable by namespace (namespaceId), status and a search term matched against name and description. Restricted members receive only keys stored in their namespace. Pass nextCursor back as cursor for the next page; it is null on the last page.
apiKeyheader
x-api-key<token>limit?|nullcursor?stringnamespaceId?stringMatch
^ns_[0-9a-hjkmnp-tv-z]{16,24}$status?stringValue in
"active""revoked"search?stringApiKeyPage
application/json- response
items*array<>nextCursor*string|nullimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.apiKeys.list({});Example Response
{
"items": [
{
"id": "string",
"name": "string",
"key": "string",
"start": "string",
"end": "string",
"description": "string",
"createdAt": "string",
"expiresAt": "string",
"lastUsedAt": "string",
"isActive": true,
"access": {
"mode": "full"
},
"owner": {
"id": "string",
"name": "string",
"email": "string"
}
}
],
"nextCursor": "string"
}