List Agent Gateways
Lists the account’s Agent Gateway instances, newest first, one page at a time.
GET
/
agent_gateways
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.agentGateways.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.agent_gateways.list()
print(page.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"),
)
agentGateways, err := client.AgentGateways.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", agentGateways.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.agentGateways().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.agent_gateways.list
puts(page)<?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 {
$page = $client->agentGateways->list();
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx agent-gateways list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/agent_gateways \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "ecffdf4b-93ea-4a7b-8295-51dfd2077996",
"name": "support-gw",
"engine": "litellm",
"engine_version": "v1.105.1",
"status": "ready",
"gateway_url": "http://172.27.0.3:4000",
"wireguard_interface_id": "c788eb40-a4c0-4bf5-8f84-976027960f8e",
"network_id": "7ade8c3c-95a7-447b-92f2-c829f760159c",
"created_at": "2026-10-21T19:32:48.377714Z"
}
],
"meta": {
"total_results": 1,
"page_number": 1,
"page_size": 50,
"total_pages": 1
}
}{
"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": "10033",
"title": "Value outside of range",
"detail": "Input should be greater than or equal to 1",
"source": {
"parameter": "page[size]"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10033"
}
}
]
}Authorizations
Telnyx API key
Query Parameters
The page to return, counting from 1.
Required range:
x >= 1Results per page.
Required range:
1 <= x <= 100Was this page helpful?
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const response of client.agentGateways.list()) {
console.log(response);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.agent_gateways.list()
print(page.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"),
)
agentGateways, err := client.AgentGateways.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", agentGateways.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
var page = client.agentGateways().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.agent_gateways.list
puts(page)<?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 {
$page = $client->agentGateways->list();
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx agent-gateways list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/agent_gateways \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "ecffdf4b-93ea-4a7b-8295-51dfd2077996",
"name": "support-gw",
"engine": "litellm",
"engine_version": "v1.105.1",
"status": "ready",
"gateway_url": "http://172.27.0.3:4000",
"wireguard_interface_id": "c788eb40-a4c0-4bf5-8f84-976027960f8e",
"network_id": "7ade8c3c-95a7-447b-92f2-c829f760159c",
"created_at": "2026-10-21T19:32:48.377714Z"
}
],
"meta": {
"total_results": 1,
"page_number": 1,
"page_size": 50,
"total_pages": 1
}
}{
"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": "10033",
"title": "Value outside of range",
"detail": "Input should be greater than or equal to 1",
"source": {
"parameter": "page[size]"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10033"
}
}
]
}