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.
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);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)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
team, err := client.AgentGateways.Teams.Update(
context.TODO(),
"instance_id",
"team_id",
telnyx.AgentGatewayTeamUpdateParams{
Name: telnyx.String("name"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", team.Data)
}
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);
}
}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)<?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();
}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 namecurl --request PATCH \
--url https://api.telnyx.com/v2/agent_gateways/{instance_id}/teams/{team_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_budget": 100
}
'{
"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
}
}{
"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"
}
}
]
}{
"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"
}
}
]
}{
"errors": [
{
"code": "99901",
"title": "Instance not ready",
"detail": "The instance is not ready; its engine is not running."
}
]
}{
"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"
}
}
]
}{
"errors": [
{
"code": "99903",
"title": "Engine unavailable",
"detail": "The instance's engine did not answer; try again shortly."
}
]
}Authorizations
Telnyx API key
Path Parameters
The Agent Gateway's id.
The team's id.
Body
A field left out stays as it is; null clears it.
A label for people.
1 - 100The models the team's keys may use. [] allows every model.
1001 - 200The most the team's keys may spend together, in USD.
x >= 0How often the spend resets.
^[1-9][0-9]{0,6}[smhd]$"30d"
true makes the instance refuse every key in the team; false lets them through again.
The most requests the team's keys may make per minute, together.
1 <= x <= 2147483647The most tokens the team's keys may use per minute, together.
1 <= x <= 2147483647Response
The updated team
A team on an instance: a model list, a budget, and rate limits that its keys share.
Show child attributes
Show child attributes
Was this page helpful?
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);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)
package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
team, err := client.AgentGateways.Teams.Update(
context.TODO(),
"instance_id",
"team_id",
telnyx.AgentGatewayTeamUpdateParams{
Name: telnyx.String("name"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", team.Data)
}
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);
}
}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)<?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();
}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 namecurl --request PATCH \
--url https://api.telnyx.com/v2/agent_gateways/{instance_id}/teams/{team_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_budget": 100
}
'{
"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
}
}{
"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"
}
}
]
}{
"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"
}
}
]
}{
"errors": [
{
"code": "99901",
"title": "Instance not ready",
"detail": "The instance is not ready; its engine is not running."
}
]
}{
"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"
}
}
]
}{
"errors": [
{
"code": "99903",
"title": "Engine unavailable",
"detail": "The instance's engine did not answer; try again shortly."
}
]
}