> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a team

> Changes a team's settings. A field left out stays as it is, and `null` clears it. `models: []` lifts the model restriction. Setting `blocked` to `true` makes the instance refuse every key in the team with `401`. The instance must be `ready`; otherwise the request answers `409`.



## OpenAPI

````yaml /openapi/source/external/agent-gateway/agent-gateway.json patch /agent_gateways/{instance_id}/teams/{team_id}
openapi: 3.1.0
info:
  version: 1.0.0
  title: Telnyx API
  x-latency-category: interactive
  x-endpoint-cost: light
  description: >-
    Agent Gateway authenticates, authorizes, and audits the requests agents send
    to models, tools, and other agents. Each gateway runs as a dedicated
    instance on the account's
    [*Network*](https://developers.telnyx.com/docs/network/overview). This API
    creates, lists, and deletes instances, and manages the keys, teams, spend
    logs, MCP servers, APIs, tool permissions, and guardrails on them. Each
    instance serves an OpenAI-compatible API at its `gateway_url`.
servers:
  - url: https://api.telnyx.com/v2
    description: Telnyx API v2
security:
  - bearerAuth: []
tags:
  - name: Agent Gateways
    description: Create, list, retrieve, and delete Agent Gateway instances.
  - name: Agent Gateway Keys
    description: Keys on an instance.
  - name: Agent Gateway Teams
    description: 'Teams on an instance: shared model lists, budgets, and rate limits.'
  - name: Agent Gateway Spend Logs
    description: The requests an instance served, with their cost.
  - name: Agent Gateway MCP Servers
    description: MCP servers on an instance, served to agents at one MCP endpoint.
  - name: Agent Gateway APIs
    description: REST APIs on an instance, served to agents as tools.
  - name: Agent Gateway Tool Permissions
    description: The MCP servers and tools a key or team may use.
  - name: Agent Gateway Guardrails
    description: Checks an instance runs on model and tool requests.
  - name: Agent Gateway Policies
    description: Named sets of guardrails an instance applies to requests.
  - name: Agent Gateway Policy Attachments
    description: Where an instance applies each policy.
paths:
  /agent_gateways/{instance_id}/teams/{team_id}:
    patch:
      tags:
        - Agent Gateway Teams
      summary: Update a team
      description: >-
        Changes a team's settings. A field left out stays as it is, and `null`
        clears it. `models: []` lifts the model restriction. Setting `blocked`
        to `true` makes the instance refuse every key in the team with `401`.
        The instance must be `ready`; otherwise the request answers `409`.
      operationId: UpdateAgentGatewayTeam
      parameters:
        - name: instance_id
          in: path
          required: true
          description: The Agent Gateway's `id`.
          schema:
            type: string
            format: uuid
          example: ecffdf4b-93ea-4a7b-8295-51dfd2077996
        - name: team_id
          in: path
          required: true
          description: The team's `id`.
          schema:
            type: string
            format: uuid
          example: 0b6c5d4e-3f2a-4b1c-9d8e-7f6a5b4c3d2e
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentGatewayTeamUpdate'
            examples:
              budget:
                summary: Raise the budget
                value:
                  max_budget: 100
      responses:
        '200':
          description: The updated team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentGatewayTeamResponse'
              example:
                data:
                  id: 0b6c5d4e-3f2a-4b1c-9d8e-7f6a5b4c3d2e
                  name: support
                  models:
                    - GLM-5.3-Flash
                    - Qwen3.8-27B-nothink
                  max_budget: 100
                  budget_resets_every: 30d
                  budget_resets_at: '2026-11-20T19:35:00Z'
                  spend: 0
                  created_at: '2026-10-21T19:35:00Z'
                  blocked: false
                  requests_per_minute: 120
                  tokens_per_minute: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: '10009'
                    title: Authentication failed
                    detail: >-
                      The required authentication headers were either invalid or
                      not included in the request.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10009
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: '10005'
                    title: Resource not found
                    detail: The requested resource or URL could not be found.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10005
        '409':
          description: The instance is not `ready`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: '99901'
                    title: Instance not ready
                    detail: The instance is not ready; its engine is not running.
        '422':
          description: Invalid request body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: '10033'
                    title: Value outside of range
                    detail: Input should be greater than or equal to 0
                    source:
                      pointer: /max_budget
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10033
        '502':
          description: The instance's engine did not answer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TelnyxErrors'
              example:
                errors:
                  - code: '99903'
                    title: Engine unavailable
                    detail: The instance's engine did not answer; try again shortly.
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const AgentGatewayTeam = await
            client.agentGateways.teams.update('instance_id', 'team_id', {
              name: 'name',
            });


            console.log(AgentGatewayTeam.data);
        - lang: Python
          source: |
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            agent_gateway_team = client.agent_gateways.teams.update(
                instance_id="instance_id",
                team_id="team_id",
                name="name",
            )
            print(agent_gateway_team.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tteam, err := client.AgentGateways.Teams.Update(\n\t\tcontext.TODO(),\n\t\t\"instance_id\",\n\t\t\"team_id\",\n\t\ttelnyx.AgentGatewayTeamUpdateParams{\n\t\t\tName: telnyx.String(\"name\"),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", team.Data)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

            import com.telnyx.sdk.client.TelnyxClient;
            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
            import com.telnyx.sdk.models.agentGateways.teams.TeamUpdateParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    TeamUpdateParams params = TeamUpdateParams.builder()
                        .name("name")
                        .build();
                    var response = client.agentGateways().teams().update("instance_id", "team_id", params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            agent_gateway_team =
            telnyx.agent_gateways.teams.update("instance_id", "team_id", name:
            "name")


            puts(agent_gateway_team)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $agent_gateway_team = $client->agentGateways->teams->update(
                'instance_id',
                'team_id',
                name: 'name',
              );

              var_dump($agent_gateway_team);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx agent-gateways:teams update \
              --api-key 'My API Key' \
              --instance-id ecffdf4b-93ea-4a7b-8295-51dfd2077996 \
              --team-id 0b6c5d4e-3f2a-4b1c-9d8e-7f6a5b4c3d2e \
              --name name
components:
  schemas:
    AgentGatewayTeamUpdate:
      type: object
      additionalProperties: false
      description: A field left out stays as it is; `null` clears it.
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
          description: A label for people.
        models:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 200
          maxItems: 100
          description: The models the team's keys may use. `[]` allows every model.
        max_budget:
          anyOf:
            - type: number
              minimum: 0
            - type: 'null'
          description: The most the team's keys may spend together, in USD.
        budget_resets_every:
          anyOf:
            - type: string
              pattern: ^[1-9][0-9]{0,6}[smhd]$
              examples:
                - 30d
            - type: 'null'
          description: How often the spend resets.
        blocked:
          type: boolean
          description: >-
            `true` makes the instance refuse every key in the team; `false` lets
            them through again.
        requests_per_minute:
          anyOf:
            - type: integer
              minimum: 1
              maximum: 2147483647
            - type: 'null'
          description: The most requests the team's keys may make per minute, together.
        tokens_per_minute:
          anyOf:
            - type: integer
              minimum: 1
              maximum: 2147483647
            - type: 'null'
          description: The most tokens the team's keys may use per minute, together.
    AgentGatewayTeamResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/AgentGatewayTeam'
    TelnyxErrors:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/TelnyxError'
    AgentGatewayTeam:
      type: object
      description: >-
        A team on an instance: a model list, a budget, and rate limits that its
        keys share.
      required:
        - id
        - name
        - models
        - max_budget
        - budget_resets_every
        - budget_resets_at
        - spend
        - created_at
        - blocked
        - requests_per_minute
        - tokens_per_minute
      properties:
        id:
          type: string
          description: Identifies the team.
        name:
          anyOf:
            - type: string
            - type: 'null'
          description: A label for people. Names need not be unique.
        models:
          type: array
          items:
            type: string
          description: >-
            The models the team's keys may use. Empty means every model the
            instance serves.
        max_budget:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            The most the team's keys may spend together, in USD, until the
            budget resets.
        budget_resets_every:
          anyOf:
            - type: string
            - type: 'null'
          description: How often the team's spend resets, such as `30d`.
        budget_resets_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: When the team's spend next resets.
        spend:
          type: number
          description: What the team's keys have spent since the budget last reset, in USD.
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: When the team was created.
        blocked:
          type: boolean
          description: Whether the instance refuses every key in the team.
        requests_per_minute:
          anyOf:
            - type: integer
            - type: 'null'
          description: The most requests the team's keys may make per minute, together.
        tokens_per_minute:
          anyOf:
            - type: integer
            - type: 'null'
          description: The most tokens the team's keys may use per minute, together.
    TelnyxError:
      type: object
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              type: string
            parameter:
              type: string
        meta:
          type: object
          properties:
            url:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Telnyx API key

````