BazaarLinkBazaarLink
Sign in
DocsAPI ReferenceSDK ReferenceAgentic UsageAI Skills
Management Keys

Get a BYOK key

Fetches one of the organization's BYOK keys by id, including the model mapping list and health fields. The upstream key appears only masked (keyMask).

GET/api/v1/management/byok-keys/:id

Authorizations

Authorizationrequired
string · header

API key as bearer token in the Authorization header.

Path parameters

idrequired
string

The BYOK key id (from create or list).

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

Success — returns { key }.

{
  "key": {
    "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.
Get a BYOK key — BazaarLink API