{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bookmyhost/json-schema/bookmyhost-bulk-update-team-keys-request-schema.json",
  "title": "BulkUpdateTeamKeysRequest",
  "description": "Apply one update payload to many keys inside a team; provide either `key_ids` or `all_keys_in_team=True`.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bookmyhost-key-management-api-openapi.yml#/components/schemas/BulkUpdateTeamKeysRequest",
  "properties": {
    "team_id": {
      "type": "string",
      "title": "Team Id"
    },
    "key_ids": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Key Ids"
    },
    "all_keys_in_team": {
      "type": "boolean",
      "title": "All Keys In Team",
      "default": false
    },
    "update_fields": {
      "$ref": "#/$defs/KeyUpdateFields"
    }
  },
  "type": "object",
  "required": [
    "team_id",
    "update_fields"
  ],
  "$defs": {
    "KeyUpdateFields": {
      "properties": {
        "max_budget": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Budget"
        },
        "budget_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Budget Id"
        },
        "budget_duration": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Budget Duration"
        },
        "budget_limits": {
          "anyOf": [
            {
              "items": {},
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Budget Limits"
        },
        "model_max_budget": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model Max Budget"
        },
        "tpm_limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tpm Limit"
        },
        "rpm_limit": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rpm Limit"
        },
        "model_tpm_limit": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model Tpm Limit"
        },
        "model_rpm_limit": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Model Rpm Limit"
        },
        "max_parallel_requests": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Max Parallel Requests"
        },
        "rpm_limit_type": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "guaranteed_throughput",
                "best_effort_throughput",
                "dynamic"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Rpm Limit Type"
        },
        "tpm_limit_type": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "guaranteed_throughput",
                "best_effort_throughput",
                "dynamic"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Tpm Limit Type"
        },
        "temp_budget_increase": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Temp Budget Increase"
        },
        "temp_budget_expiry": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Temp Budget Expiry"
        },
        "duration": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Duration"
        },
        "tags": {
          "anyOf": [
            {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tags"
        },
        "metadata": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Metadata"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "KeyUpdateFields",
      "description": "Allowlist of bulk-broadcastable fields for /team/key/bulk_update; `extra=\"forbid\"` blocks RBAC/ownership/scope mutations even by team admins."
    }
  }
}