Open app
Moonborn — API · api-keys

Get API key detail

GET/v1/api-keys/{id}scope · Bearer (API key or session JWT)
Path parameters
FieldTypeDescription
idreqstringAPI key id (UUID).

Responses

200API key summary (no plaintext).
Body
FieldTypeDescription
idreqstring
prefixreqstring
namereqstring
scopesreqstring · "*" | "read:personas" | "write:personas" | "read:chat" | "write:chat" | "read:marketplace" | "write:marketplace" | "read:billing" | "read:audit" | "read:webhooks" | "write:webhooks" | "read:config" | "write:config"[]
orgIdreqstring
workspaceIdreqstring
createdByreqstring
createdAtreqstring
expiresAtreqstring
lastUsedAtreqstring
rotatedAtreqstring
revokedAtreqstring
statusreqstring · "active" | "rotated" | "revoked" | "expired"
401Unauthenticated.
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
error.detailsobject
403Forbidden.
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
error.detailsobject
404Key not found or belongs to another org.
Body
FieldTypeDescription
errorreqobject
error.codereqstring
error.messagereqstring
error.detailsobject

Examples

cURL
curl -X GET https://api.moonborn.co/v1/api-keys/<id> \
  -H "Authorization: Bearer $MOONBORN_API_KEY"
TypeScript
import Moonborn from '@moonborn/sdk';

const client = new Moonborn({ apiKey: process.env.MOONBORN_API_KEY });

const result = await client.api_keys.getApiKey({
  id: '<id>',
});
Python
import os
from moonborn import Moonborn

client = Moonborn(api_key=os.environ["MOONBORN_API_KEY"])

result = client.api_keys.get_api_key(
    id="<id>",
)