---
title: "Update team"
method: PUT
path: "/api/governance/teams/{team_id}"
tags: ["Governance"]
---

# Update team

`PUT /api/governance/teams/{team_id}`

Updates an existing team.

## Path parameters

- `team_id` string, required

## Request body

- UpdateTeamRequest — Update team request
  - `name` string
  - `customer_id` string
  - `budgets` CreateBudgetRequest[] — Replacement set of budgets for this team; reset durations must be unique
    - `max_limit` number, required
    - `reset_duration` string, required
    - `calendar_aligned` boolean — When true, usage resets at the start of each calendar period in UTC instead of on a rolling window from last reset. Only valid with reset durations that use day, week, month, or year suffixes (`d`, `w`, `M`, `Y`). For example `1d` resets at midnight UTC; `1w` at Monday 00:00 UTC; `1M` on the first day of each month; `1Y` on January 1. Sub-day durations (e.g. `1h`) cannot use calendar alignment.

## Response `200`

Team updated successfully

- TeamResponse — Team operation response
  - `message` string
  - `team` Team — Team configuration
    - `id` string
    - `name` string
    - `customer_id` string
    - `customer` Customer — Customer configuration
      - `id` string
      - `name` string
      - `budget_id` string
      - `budget` Budget — Budget configuration
        - `id` string, required
        - `max_limit` number, required — Maximum budget in dollars
        - `reset_duration` string, required — Reset duration (e.g., "30s", "5m", "1h", "1d", "1w", "1M")
        - `calendar_aligned` boolean — When true, resets align to calendar period boundaries in UTC (not rolling from last reset)
        - `last_reset` string, date-time, required
        - `current_usage` number, required
        - `team_id` string — Team that owns this budget, when the budget is team-scoped
        - `virtual_key_id` string — Virtual key that owns this budget, when the budget is virtual-key-scoped
        - `provider_config_id` integer — Provider config that owns this budget, when the budget is provider-config-scoped
        - `config_hash` string, nullable, required
        - `created_at` string, date-time, required
        - `updated_at` string, date-time, required
      - `teams` Team[]
      - `virtual_keys` VirtualKey[]
        - `id` string, required
        - `name` string, required
        - `value` string, required
        - `description` string
        - `is_active` boolean, required
        - `expires_at` string, date-time, nullable — Expiry timestamp. Requests using this virtual key are rejected once it passes. Null or absent means the key never expires.
        - `provider_configs` VirtualKeyProviderConfig[], required
          - `id` integer, required
          - `virtual_key_id` string, required
          - `provider` string, required
          - `weight` number, nullable, required — Weight for provider load balancing. Null means excluded from weighted routing.
          - `allowed_models` string[], required
          - `blacklisted_models` string[], required
          - `allow_all_keys` boolean, required
          - `rate_limit_id` string
          - `budgets` Budget[] — Budget quotas assigned to this provider config
            - `id` string, required
            - `max_limit` number, required — Maximum budget in dollars
            - `reset_duration` string, required — Reset duration (e.g., "30s", "5m", "1h", "1d", "1w", "1M")
            - `calendar_aligned` boolean — When true, resets align to calendar period boundaries in UTC (not rolling from last reset)
            - `last_reset` string, date-time, required
            - `current_usage` number, required
            - `team_id` string — Team that owns this budget, when the budget is team-scoped
            - `virtual_key_id` string — Virtual key that owns this budget, when the budget is virtual-key-scoped
            - `provider_config_id` integer — Provider config that owns this budget, when the budget is provider-config-scoped
            - `config_hash` string, nullable, required
            - `created_at` string, date-time, required
            - `updated_at` string, date-time, required
          - `rate_limit` RateLimit — Rate limit configuration
            - `id` string, required
            - `token_max_limit` integer
            - `token_reset_duration` string
            - `token_current_usage` integer, required
            - `token_last_reset` string, date-time, required
            - `request_max_limit` integer, nullable
            - `request_reset_duration` string, nullable
            - `request_current_usage` integer, required
            - `request_last_reset` string, date-time, required
            - `config_hash` string, nullable, required
            - `created_at` string, date-time, required
            - `updated_at` string, date-time, required
          - `keys` TableKey[], nullable, required — Associated API keys for this provider config. **Always null in the quota endpoint** — keys are intentionally not loaded here to keep the response lean and avoid exposing sensitive credentials. Use the admin virtual-key API to inspect actual key assignments.
            - `id` integer
            - `name` string
            - `provider_id` integer
            - `provider` string
            - `key_id` string
            - `value` object — Environment variable configuration
              - …
            - `models` string[]
            - `weight` number, nullable
            - `enabled` boolean, nullable
            - `use_for_batch_api` boolean, nullable
            - `created_at` string, date-time
            - `updated_at` string, date-time
            - `config_hash` string, nullable
            - `azure_endpoint` object, nullable — Environment variable configuration
              - …
            - `azure_client_id` object, nullable — Environment variable configuration
              - …
            - `azure_client_secret` object, nullable — Environment variable configuration
              - …
            - `azure_tenant_id` object, nullable — Environment variable configuration
              - …
            - `vertex_project_id` object, nullable — Environment variable configuration
              - …
            - `vertex_project_number` object, nullable — Environment variable configuration
              - …
            - `vertex_region` object, nullable — Environment variable configuration
              - …
            - `vertex_auth_credentials` object, nullable — Environment variable configuration
              - …
            - `bedrock_access_key` object, nullable — Environment variable configuration
              - …
            - `bedrock_secret_key` object, nullable — Environment variable configuration
              - …
            - `bedrock_session_token` object, nullable — Environment variable configuration
              - …
            - `bedrock_region` object, nullable — Environment variable configuration
              - …
            - `bedrock_arn` object, nullable — Environment variable configuration
              - …
        - `mcp_configs` VirtualKeyMCPConfig[], required
          - `id` integer, required
          - `virtual_key_id` string, required
          - `mcp_client_id` integer, required
          - `mcp_client` MCPClientConfig, required — Full MCP client configuration (used in responses)
            - `client_id` string — Unique identifier for the MCP client
            - `name` string — Display name for the MCP client
            - `is_code_mode_client` boolean — Whether this client is available in code mode
            - `connection_type` 'http' | 'stdio' | 'sse' | 'inprocess' — Connection type for MCP client
            - `connection_string` string — HTTP or SSE URL (required for HTTP or SSE connections)
            - `stdio_config` object — STDIO configuration for MCP client
              - …
            - `tls_config` object — TLS configuration for HTTP and SSE connections.
              - …
            - `auth_type` 'none' | 'headers' | 'oauth' | 'per_user_oauth' | 'per_user_headers' — Authentication type for the MCP connection
            - `oauth_config_id` string — OAuth config ID for OAuth authentication. References the oauth_configs table. Only set when auth_type is "oauth".
            - `headers` object — Custom headers to include in requests. Only used when auth_type is "headers".
            - `tools_to_execute` string[] — Include-only list for tools. ["*"] => all tools are included [] => no tools are included ["tool1", "tool2"] => include only the specified tools
            - `tools_to_auto_execute` string[] — List of tools that can be auto-executed without user approval. Must be a subset of tools_to_execute. ["*"] => all executable tools can be auto-executed [] => no tools are auto-executed ["tool1", "tool2"] => only specified tools can be auto-executed
            - `tool_pricing` object — Per-tool cost in USD for execution. Key is the tool name, value is the cost per execution. Example: {"read_file": 0.001, "write_file": 0.002}
            - `allow_on_all_virtual_keys` boolean — When true, this MCP client's tools are accessible to all virtual keys without requiring explicit per-key assignment. All tools are allowed by default. If a virtual key has an explicit MCP config for this client, that config takes precedence and overrides this behaviour.
            - `per_user_header_keys` string[] — For `per_user_headers` clients only. The list of header names each end-user must supply via the inline-401 flow. Header values themselves are stored per-user in a separate table (surfaced on `/api/mcp/sessions`).
            - `disabled` boolean — Whether the client is intentionally disabled. When true, the client has no active connection or workers and its tools are not available for inference.
          - `tools_to_execute` string[], required
        - `team_id` string
        - `customer_id` string
        - `rate_limit_id` string
        - `calendar_aligned` boolean, required
        - `team` Team — recursive
        - `customer` Customer — recursive
        - `budgets` Budget[] — Budget quotas assigned directly to this virtual key
          - `id` string, required
          - `max_limit` number, required — Maximum budget in dollars
          - `reset_duration` string, required — Reset duration (e.g., "30s", "5m", "1h", "1d", "1w", "1M")
          - `calendar_aligned` boolean — When true, resets align to calendar period boundaries in UTC (not rolling from last reset)
          - `last_reset` string, date-time, required
          - `current_usage` number, required
          - `team_id` string — Team that owns this budget, when the budget is team-scoped
          - `virtual_key_id` string — Virtual key that owns this budget, when the budget is virtual-key-scoped
          - `provider_config_id` integer — Provider config that owns this budget, when the budget is provider-config-scoped
          - `config_hash` string, nullable, required
          - `created_at` string, date-time, required
          - `updated_at` string, date-time, required
        - `rate_limit` RateLimit — Rate limit configuration
          - `id` string, required
          - `token_max_limit` integer
          - `token_reset_duration` string
          - `token_current_usage` integer, required
          - `token_last_reset` string, date-time, required
          - `request_max_limit` integer, nullable
          - `request_reset_duration` string, nullable
          - `request_current_usage` integer, required
          - `request_last_reset` string, date-time, required
          - `config_hash` string, nullable, required
          - `created_at` string, date-time, required
          - `updated_at` string, date-time, required
        - `config_hash` string, required
        - `created_by_user_id` string — User that created this virtual key, when available
        - `created_at` string, date-time, required
        - `updated_at` string, date-time, required
      - `config_hash` string
      - `created_at` string, date-time
      - `updated_at` string, date-time
    - `budgets` Budget[] — Budgets owned by this team
      - `id` string, required
      - `max_limit` number, required — Maximum budget in dollars
      - `reset_duration` string, required — Reset duration (e.g., "30s", "5m", "1h", "1d", "1w", "1M")
      - `calendar_aligned` boolean — When true, resets align to calendar period boundaries in UTC (not rolling from last reset)
      - `last_reset` string, date-time, required
      - `current_usage` number, required
      - `team_id` string — Team that owns this budget, when the budget is team-scoped
      - `virtual_key_id` string — Virtual key that owns this budget, when the budget is virtual-key-scoped
      - `provider_config_id` integer — Provider config that owns this budget, when the budget is provider-config-scoped
      - `config_hash` string, nullable, required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
    - `virtual_keys` VirtualKey[], nullable — Virtual keys assigned to this team. This field may be omitted or returned as null in some responses (for example, when a team is embedded inside a virtual-key response) to avoid nested `virtual_keys` recursion.
      - `id` string, required
      - `name` string, required
      - `value` string, required
      - `description` string
      - `is_active` boolean, required
      - `expires_at` string, date-time, nullable — Expiry timestamp. Requests using this virtual key are rejected once it passes. Null or absent means the key never expires.
      - `provider_configs` VirtualKeyProviderConfig[], required
        - `id` integer, required
        - `virtual_key_id` string, required
        - `provider` string, required
        - `weight` number, nullable, required — Weight for provider load balancing. Null means excluded from weighted routing.
        - `allowed_models` string[], required
        - `blacklisted_models` string[], required
        - `allow_all_keys` boolean, required
        - `rate_limit_id` string
        - `budgets` Budget[] — Budget quotas assigned to this provider config
          - `id` string, required
          - `max_limit` number, required — Maximum budget in dollars
          - `reset_duration` string, required — Reset duration (e.g., "30s", "5m", "1h", "1d", "1w", "1M")
          - `calendar_aligned` boolean — When true, resets align to calendar period boundaries in UTC (not rolling from last reset)
          - `last_reset` string, date-time, required
          - `current_usage` number, required
          - `team_id` string — Team that owns this budget, when the budget is team-scoped
          - `virtual_key_id` string — Virtual key that owns this budget, when the budget is virtual-key-scoped
          - `provider_config_id` integer — Provider config that owns this budget, when the budget is provider-config-scoped
          - `config_hash` string, nullable, required
          - `created_at` string, date-time, required
          - `updated_at` string, date-time, required
        - `rate_limit` RateLimit — Rate limit configuration
          - `id` string, required
          - `token_max_limit` integer
          - `token_reset_duration` string
          - `token_current_usage` integer, required
          - `token_last_reset` string, date-time, required
          - `request_max_limit` integer, nullable
          - `request_reset_duration` string, nullable
          - `request_current_usage` integer, required
          - `request_last_reset` string, date-time, required
          - `config_hash` string, nullable, required
          - `created_at` string, date-time, required
          - `updated_at` string, date-time, required
        - `keys` TableKey[], nullable, required — Associated API keys for this provider config. **Always null in the quota endpoint** — keys are intentionally not loaded here to keep the response lean and avoid exposing sensitive credentials. Use the admin virtual-key API to inspect actual key assignments.
          - `id` integer
          - `name` string
          - `provider_id` integer
          - `provider` string
          - `key_id` string
          - `value` object — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `models` string[]
          - `weight` number, nullable
          - `enabled` boolean, nullable
          - `use_for_batch_api` boolean, nullable
          - `created_at` string, date-time
          - `updated_at` string, date-time
          - `config_hash` string, nullable
          - `azure_endpoint` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `azure_client_id` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `azure_client_secret` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `azure_tenant_id` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `vertex_project_id` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `vertex_project_number` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `vertex_region` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `vertex_auth_credentials` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `bedrock_access_key` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `bedrock_secret_key` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `bedrock_session_token` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `bedrock_region` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
          - `bedrock_arn` object, nullable — Environment variable configuration
            - `value` string
            - `env_var` string
            - `from_env` boolean
      - `mcp_configs` VirtualKeyMCPConfig[], required
        - `id` integer, required
        - `virtual_key_id` string, required
        - `mcp_client_id` integer, required
        - `mcp_client` MCPClientConfig, required — Full MCP client configuration (used in responses)
          - `client_id` string — Unique identifier for the MCP client
          - `name` string — Display name for the MCP client
          - `is_code_mode_client` boolean — Whether this client is available in code mode
          - `connection_type` 'http' | 'stdio' | 'sse' | 'inprocess' — Connection type for MCP client
          - `connection_string` string — HTTP or SSE URL (required for HTTP or SSE connections)
          - `stdio_config` object — STDIO configuration for MCP client
            - `command` string — Executable command to run
            - `args` string[] — Command line arguments
            - `envs` string[] — Environment variables required
          - `tls_config` object — TLS configuration for HTTP and SSE connections.
            - `insecure_skip_verify` boolean — Disable TLS certificate verification. Development/testing only.
            - `ca_cert_pem` string — PEM-encoded CA certificate. Supports env.VAR_NAME syntax for input. Responses return a redacted placeholder rather than the raw PEM value.
          - `auth_type` 'none' | 'headers' | 'oauth' | 'per_user_oauth' | 'per_user_headers' — Authentication type for the MCP connection
          - `oauth_config_id` string — OAuth config ID for OAuth authentication. References the oauth_configs table. Only set when auth_type is "oauth".
          - `headers` object — Custom headers to include in requests. Only used when auth_type is "headers".
          - `tools_to_execute` string[] — Include-only list for tools. ["*"] => all tools are included [] => no tools are included ["tool1", "tool2"] => include only the specified tools
          - `tools_to_auto_execute` string[] — List of tools that can be auto-executed without user approval. Must be a subset of tools_to_execute. ["*"] => all executable tools can be auto-executed [] => no tools are auto-executed ["tool1", "tool2"] => only specified tools can be auto-executed
          - `tool_pricing` object — Per-tool cost in USD for execution. Key is the tool name, value is the cost per execution. Example: {"read_file": 0.001, "write_file": 0.002}
          - `allow_on_all_virtual_keys` boolean — When true, this MCP client's tools are accessible to all virtual keys without requiring explicit per-key assignment. All tools are allowed by default. If a virtual key has an explicit MCP config for this client, that config takes precedence and overrides this behaviour.
          - `per_user_header_keys` string[] — For `per_user_headers` clients only. The list of header names each end-user must supply via the inline-401 flow. Header values themselves are stored per-user in a separate table (surfaced on `/api/mcp/sessions`).
          - `disabled` boolean — Whether the client is intentionally disabled. When true, the client has no active connection or workers and its tools are not available for inference.
        - `tools_to_execute` string[], required
      - `team_id` string
      - `customer_id` string
      - `rate_limit_id` string
      - `calendar_aligned` boolean, required
      - `team` Team — recursive
      - `customer` Customer — Customer configuration
        - `id` string
        - `name` string
        - `budget_id` string
        - `budget` Budget — Budget configuration
          - `id` string, required
          - `max_limit` number, required — Maximum budget in dollars
          - `reset_duration` string, required — Reset duration (e.g., "30s", "5m", "1h", "1d", "1w", "1M")
          - `calendar_aligned` boolean — When true, resets align to calendar period boundaries in UTC (not rolling from last reset)
          - `last_reset` string, date-time, required
          - `current_usage` number, required
          - `team_id` string — Team that owns this budget, when the budget is team-scoped
          - `virtual_key_id` string — Virtual key that owns this budget, when the budget is virtual-key-scoped
          - `provider_config_id` integer — Provider config that owns this budget, when the budget is provider-config-scoped
          - `config_hash` string, nullable, required
          - `created_at` string, date-time, required
          - `updated_at` string, date-time, required
        - `teams` Team[]
        - `virtual_keys` VirtualKey[]
        - `config_hash` string
        - `created_at` string, date-time
        - `updated_at` string, date-time
      - `budgets` Budget[] — Budget quotas assigned directly to this virtual key
        - `id` string, required
        - `max_limit` number, required — Maximum budget in dollars
        - `reset_duration` string, required — Reset duration (e.g., "30s", "5m", "1h", "1d", "1w", "1M")
        - `calendar_aligned` boolean — When true, resets align to calendar period boundaries in UTC (not rolling from last reset)
        - `last_reset` string, date-time, required
        - `current_usage` number, required
        - `team_id` string — Team that owns this budget, when the budget is team-scoped
        - `virtual_key_id` string — Virtual key that owns this budget, when the budget is virtual-key-scoped
        - `provider_config_id` integer — Provider config that owns this budget, when the budget is provider-config-scoped
        - `config_hash` string, nullable, required
        - `created_at` string, date-time, required
        - `updated_at` string, date-time, required
      - `rate_limit` RateLimit — Rate limit configuration
        - `id` string, required
        - `token_max_limit` integer
        - `token_reset_duration` string
        - `token_current_usage` integer, required
        - `token_last_reset` string, date-time, required
        - `request_max_limit` integer, nullable
        - `request_reset_duration` string, nullable
        - `request_current_usage` integer, required
        - `request_last_reset` string, date-time, required
        - `config_hash` string, nullable, required
        - `created_at` string, date-time, required
        - `updated_at` string, date-time, required
      - `config_hash` string, required
      - `created_by_user_id` string — User that created this virtual key, when available
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
    - `profile` object
    - `config` object
    - `claims` object
    - `config_hash` string, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `400` — Bad request
- `404` — Team not found
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
