team-telnyx/telnyx-skills

telnyx-networking-go

>- Configure private networks, WireGuard VPN gateways, internet gateways, and virtual cross connects. This skill provides Go SDK examples.

First seen Mar 7, 2026

Installation

$ npx skills add team-telnyx/telnyx-skills --skill telnyx-networking-go

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from team-telnyx/telnyx-skills · top by installs.

npx skills add team-telnyx/telnyx-skills

Browse all from team-telnyx/telnyx-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 188
License LICENSE
Default branch main
Open issues 2
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

More metadata
author
telnyx
product
networking
language
go
generated_by
telnyx-openapi-pipeline

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 39,705 B
  • docs SUMMARY.md 163 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 11 installs

SKILL.md

<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->

Telnyx Networking - Go

Installation

go get github.com/team-telnyx/telnyx-go

Setup

import (
  "context"
  "fmt"
  "os"

  "github.com/team-telnyx/telnyx-go"
  "github.com/team-telnyx/telnyx-go/option"
)

client := telnyx.NewClient(
  option.WithAPIKey(os.Getenv("TELNYX_API_KEY")),
)

All examples below assume client is already initialized as shown above.

Error Handling

All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:

import "errors"

result, err := client.Messages.Send(ctx, params)
if err != nil {
  var apiErr *telnyx.Error
  if errors.As(err, &apiErr) {
    switch apiErr.StatusCode {
    case 422:
      fmt.Println("Validation error — check required fields and formats")
    case 429:
      // Rate limited — wait and retry with exponential backoff
      fmt.Println("Rate limited, retrying...")
    default:
      fmt.Printf("API error %d: %s\n", apiErr.StatusCode, apiErr.Error())
    }
  } else {
    fmt.Println("Network error — check connectivity and retry")
  }
}

Common error codes: 401 invalid API key, 403 insufficient permissions, 404 resource not found, 422 validation error (check field formats), 429 rate limited (retry with exponential backoff).

Important Notes

  • Pagination: Use ListAutoPaging() for automatic iteration: iter := client.Resource.ListAutoPaging(ctx, params); for iter.Next() { item := iter.Current() }.

List all clusters

GET /ai/clusters

	page, err := client.AI.Clusters.List(context.Background(), telnyx.AIClusterListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: bucket (string), createdat (date-time), finishedat (date-time), minclustersize (integer), minsubclustersize (integer), status (enum: pending, starting, running, completed, failed), task_id (string)

Compute new clusters

Starts a background task to compute how the data in an embedded storage bucket is clustered. This helps identify common themes and patterns in the data.

POST /ai/clusters — Required: bucket

Optional: files (array[string]), minclustersize (integer), minsubclustersize (integer), prefix (string)

	response, err := client.AI.Clusters.Compute(context.Background(), telnyx.AIClusterComputeParams{
		Bucket: "my-bucket",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response.Data)

Returns: task_id (string)

Fetch a cluster

GET /ai/clusters/{task_id}

	cluster, err := client.AI.Clusters.Get(
		context.Background(),
		"task_id",
		telnyx.AIClusterGetParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", cluster.Data)

Returns: bucket (string), clusters (array[object]), status (enum: pending, starting, running, completed, failed)

Delete a cluster

DELETE /ai/clusters/{task_id}

	err := client.AI.Clusters.Delete(context.Background(), "task_id")
	if err != nil {
		log.Fatal(err)
	}

Fetch a cluster visualization

GET /ai/clusters/{task_id}/graph

	response, err := client.AI.Clusters.FetchGraph(
		context.Background(),
		"task_id",
		telnyx.AIClusterFetchGraphParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response)

List Integrations

List all available integrations.

GET /ai/integrations

	integrations, err := client.AI.Integrations.List(context.Background())
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", integrations.Data)

Returns: availabletools (array[string]), description (string), displayname (string), id (string), logo_url (string), name (string), status (enum: disconnected, connected)

List User Integrations

List user setup integrations

GET /ai/integrations/connections

	connections, err := client.AI.Integrations.Connections.List(context.Background())
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", connections.Data)

Returns: allowedtools (array[string]), id (string), integrationid (string)

Get User Integration connection By Id

Get user setup integrations

GET /ai/integrations/connections/{userconnectionid}

	connection, err := client.AI.Integrations.Connections.Get(context.Background(), "user_connection_id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", connection.Data)

Returns: allowedtools (array[string]), id (string), integrationid (string)

Delete Integration Connection

Delete a specific integration connection.

DELETE /ai/integrations/connections/{userconnectionid}

	err := client.AI.Integrations.Connections.Delete(context.Background(), "user_connection_id")
	if err != nil {
		log.Fatal(err)
	}

List Integration By Id

Retrieve integration details

GET /ai/integrations/{integration_id}

	integration, err := client.AI.Integrations.Get(context.Background(), "integration_id")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", integration.ID)

Returns: availabletools (array[string]), description (string), displayname (string), id (string), logo_url (string), name (string), status (enum: disconnected, connected)

List all Global IP Allowed Ports

GET /globalipallowed_ports

	globalIPAllowedPorts, err := client.GlobalIPAllowedPorts.List(context.Background())
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPAllowedPorts.Data)

Returns: firstport (integer), id (uuid), lastport (integer), name (string), protocolcode (string), recordtype (string)

Global IP Assignment Health Check Metrics

GET /globalipassignment_health

	globalIPAssignmentHealth, err := client.GlobalIPAssignmentHealth.Get(context.Background(), telnyx.GlobalIPAssignmentHealthGetParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPAssignmentHealth.Data)

Returns: globalip (object), globalip_assignment (object), health (object), timestamp (date-time)

List all Global IP assignments

List all Global IP assignments.

GET /globalipassignments

	page, err := client.GlobalIPAssignments.List(context.Background(), telnyx.GlobalIPAssignmentListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: createdat (string), globalipid (uuid), id (uuid), isannounced (boolean), isconnected (boolean), isinmaintenance (boolean), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string), wireguardpeer_id (uuid)

Create a Global IP assignment

Create a Global IP assignment.

POST /globalipassignments

Optional: createdat (string), globalipid (uuid), id (uuid), isannounced (boolean), isconnected (boolean), isinmaintenance (boolean), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string), wireguardpeer_id (uuid)

	globalIPAssignment, err := client.GlobalIPAssignments.New(context.Background(), telnyx.GlobalIPAssignmentNewParams{
		GlobalIPAssignment: telnyx.GlobalIPAssignmentParam{},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPAssignment.Data)

Returns: createdat (string), globalipid (uuid), id (uuid), isannounced (boolean), isconnected (boolean), isinmaintenance (boolean), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string), wireguardpeer_id (uuid)

Retrieve a Global IP

Retrieve a Global IP assignment.

GET /globalipassignments/{id}

	globalIPAssignment, err := client.GlobalIPAssignments.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPAssignment.Data)

Returns: createdat (string), globalipid (uuid), id (uuid), isannounced (boolean), isconnected (boolean), isinmaintenance (boolean), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string), wireguardpeer_id (uuid)

Update a Global IP assignment

Update a Global IP assignment.

PATCH /globalipassignments/{id}

Optional: createdat (string), globalipid (string), id (uuid), isannounced (boolean), isconnected (boolean), isinmaintenance (boolean), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string), wireguardpeer_id (string)

	globalIPAssignment, err := client.GlobalIPAssignments.Update(
		context.Background(),
		"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
		telnyx.GlobalIPAssignmentUpdateParams{
			GlobalIPAssignmentUpdateRequest: telnyx.GlobalIPAssignmentUpdateParamsGlobalIPAssignmentUpdateRequest{
				GlobalIPAssignmentParam: telnyx.GlobalIPAssignmentParam{},
			},
		},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPAssignment.Data)

Returns: createdat (string), globalipid (uuid), id (uuid), isannounced (boolean), isconnected (boolean), isinmaintenance (boolean), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string), wireguardpeer_id (uuid)

Delete a Global IP assignment

Delete a Global IP assignment.

DELETE /globalipassignments/{id}

	globalIPAssignment, err := client.GlobalIPAssignments.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPAssignment.Data)

Returns: createdat (string), globalipid (uuid), id (uuid), isannounced (boolean), isconnected (boolean), isinmaintenance (boolean), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string), wireguardpeer_id (uuid)

Global IP Assignment Usage Metrics

GET /globalipassignments_usage

	globalIPAssignmentsUsage, err := client.GlobalIPAssignmentsUsage.Get(context.Background(), telnyx.GlobalIPAssignmentsUsageGetParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPAssignmentsUsage.Data)

Returns: globalip (object), globalip_assignment (object), received (object), timestamp (date-time), transmitted (object)

List all Global IP Health check types

List all Global IP Health check types.

GET /globaliphealthchecktypes

	globalIPHealthCheckTypes, err := client.GlobalIPHealthCheckTypes.List(context.Background())
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPHealthCheckTypes.Data)

Returns: healthcheckparams (object), healthchecktype (string), record_type (string)

List all Global IP health checks

List all Global IP health checks.

GET /globaliphealth_checks

	page, err := client.GlobalIPHealthChecks.List(context.Background(), telnyx.GlobalIPHealthCheckListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: createdat (string), globalipid (uuid), healthcheckparams (object), healthchecktype (string), id (uuid), recordtype (string), updated_at (string)

Create a Global IP health check

Create a Global IP health check.

POST /globaliphealth_checks

Optional: createdat (string), globalipid (uuid), healthcheckparams (object), healthchecktype (string), id (uuid), recordtype (string), updated_at (string)

	globalIPHealthCheck, err := client.GlobalIPHealthChecks.New(context.Background(), telnyx.GlobalIPHealthCheckNewParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPHealthCheck.Data)

Returns: createdat (string), globalipid (uuid), healthcheckparams (object), healthchecktype (string), id (uuid), recordtype (string), updated_at (string)

Retrieve a Global IP health check

Retrieve a Global IP health check.

GET /globaliphealth_checks/{id}

	globalIPHealthCheck, err := client.GlobalIPHealthChecks.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPHealthCheck.Data)

Returns: createdat (string), globalipid (uuid), healthcheckparams (object), healthchecktype (string), id (uuid), recordtype (string), updated_at (string)

Delete a Global IP health check

Delete a Global IP health check.

DELETE /globaliphealth_checks/{id}

	globalIPHealthCheck, err := client.GlobalIPHealthChecks.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPHealthCheck.Data)

Returns: createdat (string), globalipid (uuid), healthcheckparams (object), healthchecktype (string), id (uuid), recordtype (string), updated_at (string)

Global IP Latency Metrics

GET /globaliplatency

	globalIPLatency, err := client.GlobalIPLatency.Get(context.Background(), telnyx.GlobalIPLatencyGetParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPLatency.Data)

Returns: globalip (object), meanlatency (object), percentilelatency (object), proberlocation (object), timestamp (date-time)

List all Global IP Protocols

GET /globalipprotocols

	globalIPProtocols, err := client.GlobalIPProtocols.List(context.Background())
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPProtocols.Data)

Returns: code (string), name (string), record_type (string)

Global IP Usage Metrics

GET /globalipusage

	globalIPUsage, err := client.GlobalIPUsage.Get(context.Background(), telnyx.GlobalIPUsageGetParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIPUsage.Data)

Returns: global_ip (object), received (object), timestamp (date-time), transmitted (object)

List all Global IPs

List all Global IPs.

GET /global_ips

	page, err := client.GlobalIPs.List(context.Background(), telnyx.GlobalIPListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: createdat (string), description (string), id (uuid), ipaddress (string), name (string), ports (object), recordtype (string), updatedat (string)

Create a Global IP

Create a Global IP.

POST /global_ips

Optional: createdat (string), description (string), id (uuid), ipaddress (string), name (string), ports (object), recordtype (string), updatedat (string)

	globalIP, err := client.GlobalIPs.New(context.Background(), telnyx.GlobalIPNewParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIP.Data)

Returns: createdat (string), description (string), id (uuid), ipaddress (string), name (string), ports (object), recordtype (string), updatedat (string)

Retrieve a Global IP

Retrieve a Global IP.

GET /global_ips/{id}

	globalIP, err := client.GlobalIPs.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIP.Data)

Returns: createdat (string), description (string), id (uuid), ipaddress (string), name (string), ports (object), recordtype (string), updatedat (string)

Delete a Global IP

Delete a Global IP.

DELETE /global_ips/{id}

	globalIP, err := client.GlobalIPs.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", globalIP.Data)

Returns: createdat (string), description (string), id (uuid), ipaddress (string), name (string), ports (object), recordtype (string), updatedat (string)

List all Networks

List all Networks.

GET /networks

	page, err := client.Networks.List(context.Background(), telnyx.NetworkListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: createdat (string), id (uuid), name (string), recordtype (string), updated_at (string)

Create a Network

Create a new Network.

POST /networks — Required: name

Optional: createdat (string), id (uuid), recordtype (string), updated_at (string)

	network, err := client.Networks.New(context.Background(), telnyx.NetworkNewParams{
		NetworkCreate: telnyx.NetworkCreateParam{
			RecordParam: telnyx.RecordParam{},
			Name:        "test network",
		},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", network.Data)

Returns: createdat (string), id (uuid), name (string), recordtype (string), updated_at (string)

Retrieve a Network

Retrieve a Network.

GET /networks/{id}

	network, err := client.Networks.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", network.Data)

Returns: createdat (string), id (uuid), name (string), recordtype (string), updated_at (string)

Update a Network

Update a Network.

PATCH /networks/{id} — Required: name

Optional: createdat (string), id (uuid), recordtype (string), updated_at (string)

	network, err := client.Networks.Update(
		context.Background(),
		"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
		telnyx.NetworkUpdateParams{
			NetworkCreate: telnyx.NetworkCreateParam{
				RecordParam: telnyx.RecordParam{},
				Name:        "test network",
			},
		},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", network.Data)

Returns: createdat (string), id (uuid), name (string), recordtype (string), updated_at (string)

Delete a Network

Delete a Network.

DELETE /networks/{id}

	network, err := client.Networks.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", network.Data)

Returns: createdat (string), id (uuid), name (string), recordtype (string), updated_at (string)

Get Default Gateway status.

GET /networks/{id}/default_gateway

	defaultGateway, err := client.Networks.DefaultGateway.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", defaultGateway.Data)

Returns: createdat (string), id (uuid), networkid (uuid), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string), wireguardpeerid (uuid)

Create Default Gateway.

POST /networks/{id}/default_gateway

Optional: createdat (string), id (uuid), networkid (uuid), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string), wireguardpeerid (uuid)

	defaultGateway, err := client.Networks.DefaultGateway.New(
		context.Background(),
		"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
		telnyx.NetworkDefaultGatewayNewParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", defaultGateway.Data)

Returns: createdat (string), id (uuid), networkid (uuid), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string), wireguardpeerid (uuid)

Delete Default Gateway.

DELETE /networks/{id}/default_gateway

	defaultGateway, err := client.Networks.DefaultGateway.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", defaultGateway.Data)

Returns: createdat (string), id (uuid), networkid (uuid), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string), wireguardpeerid (uuid)

List all Interfaces for a Network.

GET /networks/{id}/network_interfaces

	page, err := client.Networks.ListInterfaces(
		context.Background(),
		"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
		telnyx.NetworkListInterfacesParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: createdat (string), id (uuid), name (string), networkid (uuid), recordtype (string), region (object), regioncode (string), status (enum: created, provisioning, provisioned, deleting), type (string), updated_at (string)

Get all Private Wireless Gateways

Get all Private Wireless Gateways belonging to the user.

GET /privatewirelessgateways

	page, err := client.PrivateWirelessGateways.List(context.Background(), telnyx.PrivateWirelessGatewayListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: assignedresources (array[object]), createdat (string), id (uuid), iprange (string), name (string), networkid (uuid), recordtype (string), regioncode (string), status (object), updated_at (string)

Create a Private Wireless Gateway

Asynchronously create a Private Wireless Gateway for SIM cards for a previously created network. This operation may take several minutes so you can check the Private Wireless Gateway status at the section Get a Private Wireless Gateway.

POST /privatewirelessgateways — Required: network_id, name

Optional: region_code (string)

	privateWirelessGateway, err := client.PrivateWirelessGateways.New(context.Background(), telnyx.PrivateWirelessGatewayNewParams{
		Name:      "My private wireless gateway",
		NetworkID: "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", privateWirelessGateway.Data)

Returns: assignedresources (array[object]), createdat (string), id (uuid), iprange (string), name (string), networkid (uuid), recordtype (string), regioncode (string), status (object), updated_at (string)

Get a Private Wireless Gateway

Retrieve information about a Private Wireless Gateway.

GET /privatewirelessgateways/{id}

	privateWirelessGateway, err := client.PrivateWirelessGateways.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", privateWirelessGateway.Data)

Returns: assignedresources (array[object]), createdat (string), id (uuid), iprange (string), name (string), networkid (uuid), recordtype (string), regioncode (string), status (object), updated_at (string)

Delete a Private Wireless Gateway

Deletes the Private Wireless Gateway.

DELETE /privatewirelessgateways/{id}

	privateWirelessGateway, err := client.PrivateWirelessGateways.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", privateWirelessGateway.Data)

Returns: assignedresources (array[object]), createdat (string), id (uuid), iprange (string), name (string), networkid (uuid), recordtype (string), regioncode (string), status (object), updated_at (string)

List all Public Internet Gateways

List all Public Internet Gateways.

GET /publicinternetgateways

	page, err := client.PublicInternetGateways.List(context.Background(), telnyx.PublicInternetGatewayListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: createdat (string), id (uuid), name (string), networkid (uuid), publicip (string), recordtype (string), regioncode (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

Create a Public Internet Gateway

Create a new Public Internet Gateway.

POST /publicinternetgateways

Optional: createdat (string), id (uuid), name (string), networkid (uuid), publicip (string), recordtype (string), regioncode (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

	publicInternetGateway, err := client.PublicInternetGateways.New(context.Background(), telnyx.PublicInternetGatewayNewParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", publicInternetGateway.Data)

Returns: createdat (string), id (uuid), name (string), networkid (uuid), publicip (string), recordtype (string), regioncode (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

Retrieve a Public Internet Gateway

Retrieve a Public Internet Gateway.

GET /publicinternetgateways/{id}

	publicInternetGateway, err := client.PublicInternetGateways.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", publicInternetGateway.Data)

Returns: createdat (string), id (uuid), name (string), networkid (uuid), publicip (string), recordtype (string), regioncode (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

Delete a Public Internet Gateway

Delete a Public Internet Gateway.

DELETE /publicinternetgateways/{id}

	publicInternetGateway, err := client.PublicInternetGateways.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", publicInternetGateway.Data)

Returns: createdat (string), id (uuid), name (string), networkid (uuid), publicip (string), recordtype (string), regioncode (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

List all Regions

List all regions and the interfaces that region supports

GET /regions

	regions, err := client.Regions.List(context.Background())
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", regions.Data)

Returns: code (string), createdat (string), name (string), recordtype (string), supportedinterfaces (array[string]), updatedat (string)

List all Virtual Cross Connects

List all Virtual Cross Connects.

GET /virtualcrossconnects

	page, err := client.VirtualCrossConnects.List(context.Background(), telnyx.VirtualCrossConnectListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: bandwidthmbps (number), bgpasn (number), cloudprovider (enum: aws, azure, gce), cloudproviderregion (string), createdat (string), id (uuid), name (string), networkid (uuid), primarybgpkey (string), primarycloudaccountid (string), primarycloudip (string), primaryenabled (boolean), primaryroutingannouncement (boolean), primarytelnyxip (string), recordtype (string), region (object), regioncode (string), secondarybgpkey (string), secondarycloudaccountid (string), secondarycloudip (string), secondaryenabled (boolean), secondaryroutingannouncement (boolean), secondarytelnyxip (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

Create a Virtual Cross Connect

Create a new Virtual Cross Connect. For AWS and GCE, you have the option of creating the primary connection first and the secondary connection later. You also have the option of disabling the primary and/or secondary connections at any time and later re-enabling them. With Azure, you do not have this option.

POST /virtualcrossconnects — Required: networkid, regioncode, cloudprovider, cloudproviderregion, bgpasn, primarycloudaccount_id

Optional: bandwidthmbps (number), createdat (string), id (uuid), name (string), primarybgpkey (string), primarycloudip (string), primaryenabled (boolean), primarytelnyxip (string), recordtype (string), secondarybgpkey (string), secondarycloudaccountid (string), secondarycloudip (string), secondaryenabled (boolean), secondarytelnyxip (string), status (enum: created, provisioning, provisioned, deleting), updated_at (string)

	virtualCrossConnect, err := client.VirtualCrossConnects.New(context.Background(), telnyx.VirtualCrossConnectNewParams{
		RegionCode: "ashburn-va",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", virtualCrossConnect.Data)

Returns: bandwidthmbps (number), bgpasn (number), cloudprovider (enum: aws, azure, gce), cloudproviderregion (string), createdat (string), id (uuid), name (string), networkid (uuid), primarybgpkey (string), primarycloudaccountid (string), primarycloudip (string), primaryenabled (boolean), primaryroutingannouncement (boolean), primarytelnyxip (string), recordtype (string), region (object), regioncode (string), secondarybgpkey (string), secondarycloudaccountid (string), secondarycloudip (string), secondaryenabled (boolean), secondaryroutingannouncement (boolean), secondarytelnyxip (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

Retrieve a Virtual Cross Connect

Retrieve a Virtual Cross Connect.

GET /virtualcrossconnects/{id}

	virtualCrossConnect, err := client.VirtualCrossConnects.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", virtualCrossConnect.Data)

Returns: bandwidthmbps (number), bgpasn (number), cloudprovider (enum: aws, azure, gce), cloudproviderregion (string), createdat (string), id (uuid), name (string), networkid (uuid), primarybgpkey (string), primarycloudaccountid (string), primarycloudip (string), primaryenabled (boolean), primaryroutingannouncement (boolean), primarytelnyxip (string), recordtype (string), region (object), regioncode (string), secondarybgpkey (string), secondarycloudaccountid (string), secondarycloudip (string), secondaryenabled (boolean), secondaryroutingannouncement (boolean), secondarytelnyxip (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

Update the Virtual Cross Connect

Update the Virtual Cross Connect. Cloud IPs can only be patched during the created state, as GCE will only inform you of your generated IP once the pending connection requested has been accepted.

PATCH /virtualcrossconnects/{id}

Optional: primarycloudip (string), primaryenabled (boolean), primaryroutingannouncement (boolean), secondarycloudip (string), secondaryenabled (boolean), secondaryroutingannouncement (boolean)

	virtualCrossConnect, err := client.VirtualCrossConnects.Update(
		context.Background(),
		"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
		telnyx.VirtualCrossConnectUpdateParams{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", virtualCrossConnect.Data)

Returns: bandwidthmbps (number), bgpasn (number), cloudprovider (enum: aws, azure, gce), cloudproviderregion (string), createdat (string), id (uuid), name (string), networkid (uuid), primarybgpkey (string), primarycloudaccountid (string), primarycloudip (string), primaryenabled (boolean), primaryroutingannouncement (boolean), primarytelnyxip (string), recordtype (string), region (object), regioncode (string), secondarybgpkey (string), secondarycloudaccountid (string), secondarycloudip (string), secondaryenabled (boolean), secondaryroutingannouncement (boolean), secondarytelnyxip (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

Delete a Virtual Cross Connect

Delete a Virtual Cross Connect.

DELETE /virtualcrossconnects/{id}

	virtualCrossConnect, err := client.VirtualCrossConnects.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", virtualCrossConnect.Data)

Returns: bandwidthmbps (number), bgpasn (number), cloudprovider (enum: aws, azure, gce), cloudproviderregion (string), createdat (string), id (uuid), name (string), networkid (uuid), primarybgpkey (string), primarycloudaccountid (string), primarycloudip (string), primaryenabled (boolean), primaryroutingannouncement (boolean), primarytelnyxip (string), recordtype (string), region (object), regioncode (string), secondarybgpkey (string), secondarycloudaccountid (string), secondarycloudip (string), secondaryenabled (boolean), secondaryroutingannouncement (boolean), secondarytelnyxip (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

List Virtual Cross Connect Cloud Coverage

List Virtual Cross Connects Cloud Coverage. This endpoint shows which cloud regions are available for the location_code your Virtual Cross Connect will be provisioned in.

GET /virtualcrossconnects_coverage

	page, err := client.VirtualCrossConnectsCoverage.List(context.Background(), telnyx.VirtualCrossConnectsCoverageListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: availablebandwidth (array[number]), cloudprovider (enum: aws, azure, gce), cloudproviderregion (string), location (object), record_type (string)

List all WireGuard Interfaces

List all WireGuard Interfaces.

GET /wireguard_interfaces

	page, err := client.WireguardInterfaces.List(context.Background(), telnyx.WireguardInterfaceListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: createdat (string), enablesiptrunking (boolean), endpoint (string), id (uuid), name (string), networkid (uuid), publickey (string), recordtype (string), region (object), regioncode (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

Create a WireGuard Interface

Create a new WireGuard Interface. Current limitation of 10 interfaces per user can be created.

POST /wireguardinterfaces — Required: networkid, region_code

Optional: createdat (string), enablesiptrunking (boolean), endpoint (string), id (uuid), name (string), publickey (string), recordtype (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

	wireguardInterface, err := client.WireguardInterfaces.New(context.Background(), telnyx.WireguardInterfaceNewParams{
		RegionCode: "ashburn-va",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", wireguardInterface.Data)

Returns: createdat (string), enablesiptrunking (boolean), endpoint (string), id (uuid), name (string), networkid (uuid), publickey (string), recordtype (string), region (object), regioncode (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

Retrieve a WireGuard Interfaces

Retrieve a WireGuard Interfaces.

GET /wireguard_interfaces/{id}

	wireguardInterface, err := client.WireguardInterfaces.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", wireguardInterface.Data)

Returns: createdat (string), enablesiptrunking (boolean), endpoint (string), id (uuid), name (string), networkid (uuid), publickey (string), recordtype (string), region (object), regioncode (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

Delete a WireGuard Interface

Delete a WireGuard Interface.

DELETE /wireguard_interfaces/{id}

	wireguardInterface, err := client.WireguardInterfaces.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", wireguardInterface.Data)

Returns: createdat (string), enablesiptrunking (boolean), endpoint (string), id (uuid), name (string), networkid (uuid), publickey (string), recordtype (string), region (object), regioncode (string), status (enum: created, provisioning, provisioned, deleting), updatedat (string)

List all WireGuard Peers

List all WireGuard peers.

GET /wireguard_peers

	page, err := client.WireguardPeers.List(context.Background(), telnyx.WireguardPeerListParams{})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", page)

Returns: createdat (string), id (uuid), lastseen (string), privatekey (string), publickey (string), recordtype (string), updatedat (string), wireguardinterfaceid (uuid)

Create a WireGuard Peer

Create a new WireGuard Peer. Current limitation of 5 peers per interface can be created.

POST /wireguardpeers — Required: wireguardinterface_id

Optional: createdat (string), id (uuid), lastseen (string), privatekey (string), publickey (string), recordtype (string), updatedat (string)

	wireguardPeer, err := client.WireguardPeers.New(context.Background(), telnyx.WireguardPeerNewParams{
		WireguardInterfaceID: "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", wireguardPeer.Data)

Returns: createdat (string), id (uuid), lastseen (string), privatekey (string), publickey (string), recordtype (string), updatedat (string), wireguardinterfaceid (uuid)

Retrieve the WireGuard Peer

Retrieve the WireGuard peer.

GET /wireguard_peers/{id}

	wireguardPeer, err := client.WireguardPeers.Get(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", wireguardPeer.Data)

Returns: createdat (string), id (uuid), lastseen (string), privatekey (string), publickey (string), recordtype (string), updatedat (string), wireguardinterfaceid (uuid)

Update the WireGuard Peer

Update the WireGuard peer.

PATCH /wireguard_peers/{id}

Optional: public_key (string)

	wireguardPeer, err := client.WireguardPeers.Update(
		context.Background(),
		"6a09cdc3-8948-47f0-aa62-74ac943d6c58",
		telnyx.WireguardPeerUpdateParams{
			WireguardPeerPatch: telnyx.WireguardPeerPatchParam{},
		},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", wireguardPeer.Data)

Returns: createdat (string), id (uuid), lastseen (string), privatekey (string), publickey (string), recordtype (string), updatedat (string), wireguardinterfaceid (uuid)

Delete the WireGuard Peer

Delete the WireGuard peer.

DELETE /wireguard_peers/{id}

	wireguardPeer, err := client.WireguardPeers.Delete(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", wireguardPeer.Data)

Returns: createdat (string), id (uuid), lastseen (string), privatekey (string), publickey (string), recordtype (string), updatedat (string), wireguardinterfaceid (uuid)

Retrieve Wireguard config template for Peer

GET /wireguard_peers/{id}/config

	response, err := client.WireguardPeers.GetConfig(context.Background(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response)