BazaarLinkBazaarLink
ログイン
ドキュメントAPIリファレンスSDKリファレンスエージェント利用AIスキル
Management Key

BYOKキーを更新

BYOK キーを 1 件更新します:有効/無効、名称変更、フォールバックモード切替、モデル別トグル(modelToggles)、適用範囲の再設定(scopedApiKeyIds)。全フィールド任意。アップストリームキー自体は変更不可——ローテーションは削除して再作成してください。

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

認証

Authorization必須
string · header

Authorization ヘッダーに Bearer トークンとして API キーを渡します。

パスパラメータ

id必須
string

BYOK キー id。

Body

enabled
boolean

キー全体のマスタースイッチ。

fallbackMode
string

アップストリーム失敗時にプラットフォームルーティングへ回退するか。

seamlessstrict
name
string

新しい表示名。

1-200 chars
modelToggles
{canonicalId, enabled}[]

モデル別スイッチ:各要素に canonicalId と enabled を指定。列挙したモデルのみ変更され、他は現状維持。

≤2000 items
scopedApiKeyIds
string[]

適用範囲リストを丸ごと置換:空配列=組織全体に戻します。所有していないキー id を含むと 400。

≤200 items; must be your own keys
PATCH /api/v1/management/byok-keys/:id
curl -X PATCH https://bazaarlink.ai/api/v1/management/byok-keys/byok_abc123 \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fallbackMode": "strict", "modelToggles": [{"canonicalId": "openai/gpt-4o", "enabled": false}]}'
レスポンス例

更新成功。更新後の { 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": "strict",
    "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": []
  }
}
サポート
サポート
こんにちは。どのようなご用件でしょうか?
メッセージをお送りください。担当者より返信します。
BYOKキーを更新 — BazaarLink API