BazaarLinkBazaarLink
Sign in
DocsAPI ReferenceSDK ReferenceAgentic UsageAI Skills
Management Keys

List BYOK keys

Lists all BYOK upstream keys of the calling organization. Authentication requires a Management API Key bound to that organization; the upstream key appears only in masked form (keyMask) — the full value is never retrievable after creation.

GET/api/v1/management/byok-keys

Authorizations

Authorizationrequired
string · header

API key as bearer token in the Authorization header.

GET /api/v1/management/byok-keys
curl https://bazaarlink.ai/api/v1/management/byok-keys \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY"
Response examples

Success. Each element of keys carries the masked key, protocol (openai/anthropic), fallback mode (seamless/strict), the model mapping list (models), scoped platform keys (scopedApiKeyIds — empty array means it applies to every key of the org), and health fields (lastVerifiedAt/lastErrorAt/errorCount1h).

{
  "keys": [
    {
      "id": "byok_abc123",
      "ownerType": "org",
      "userId": null,
      "organizationId": "org_abc123",
      "name": "team-upstream",
      "baseUrl": "https://api.example-upstream.com/v1",
      "keyMask": "sk-abc…wxyz",
      "protocol": "openai",
      "enabled": true,
      "fallbackMode": "seamless",
      "modelsStale": false,
      "lastVerifiedAt": "2026-07-29T00:00:00.000Z",
      "lastErrorAt": null,
      "lastErrorCode": null,
      "errorCount1h": 0,
      "createdAt": "2026-07-29T00:00:00.000Z",
      "updatedAt": "2026-07-29T00:00:00.000Z",
      "models": [
        {
          "canonicalId": "openai/gpt-4o",
          "upstreamModelId": "gpt-4o",
          "enabled": true
        }
      ],
      "scopedApiKeyIds": []
    }
  ]
}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
List BYOK keys — BazaarLink API