api/go/telnyx-porting-out-go/SKILL.md
Manage port-out requests when numbers are being ported away from Telnyx. List, view, and update port-out status. This skill provides Go SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-porting-out-goInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
go get github.com/team-telnyx/telnyx-go
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.
Returns the portout requests according to filters
GET /portouts
page, err := client.Portouts.List(context.TODO(), telnyx.PortoutListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Returns the portout request based on the ID provided
GET /portouts/{id}
portout, err := client.Portouts.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", portout.Data)
Returns a list of comments for a portout request.
GET /portouts/{id}/comments
comments, err := client.Portouts.Comments.List(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", comments.Data)
Creates a comment on a portout request.
POST /portouts/{id}/comments
comment, err := client.Portouts.Comments.New(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.PortoutCommentNewParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", comment.Data)
List every supporting documents for a portout request.
GET /portouts/{id}/supporting_documents
supportingDocuments, err := client.Portouts.SupportingDocuments.List(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", supportingDocuments.Data)
Creates a list of supporting documents on a portout request.
POST /portouts/{id}/supporting_documents
supportingDocument, err := client.Portouts.SupportingDocuments.New(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.PortoutSupportingDocumentNewParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", supportingDocument.Data)
Authorize or reject portout request
PATCH /portouts/{id}/{status} — Required: reason
response, err := client.Portouts.UpdateStatus(
context.TODO(),
telnyx.PortoutUpdateStatusParamsStatusAuthorized,
telnyx.PortoutUpdateStatusParams{
ID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
Reason: "I do not recognize this transaction",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Returns a list of all port-out events.
GET /portouts/events
page, err := client.Portouts.Events.List(context.TODO(), telnyx.PortoutEventListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Show a specific port-out event.
GET /portouts/events/{id}
event, err := client.Portouts.Events.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", event.Data)
Republish a specific port-out event.
POST /portouts/events/{id}/republish
err := client.Portouts.Events.Republish(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
panic(err.Error())
}
Given a port-out ID, list rejection codes that are eligible for that port-out
GET /portouts/rejections/{portout_id}
response, err := client.Portouts.ListRejectionCodes(
context.TODO(),
"329d6658-8f93-405d-862f-648776e8afd7",
telnyx.PortoutListRejectionCodesParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
List the reports generated about port-out operations.
GET /portouts/reports
page, err := client.Portouts.Reports.List(context.TODO(), telnyx.PortoutReportListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Generate reports about port-out operations.
POST /portouts/reports
report, err := client.Portouts.Reports.New(context.TODO(), telnyx.PortoutReportNewParams{
Params: telnyx.ExportPortoutsCsvReportParam{
Filters: telnyx.ExportPortoutsCsvReportFiltersParam{},
},
ReportType: telnyx.PortoutReportNewParamsReportTypeExportPortoutsCsv,
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", report.Data)
Retrieve a specific report generated.
GET /portouts/reports/{id}
report, err := client.Portouts.Reports.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", report.Data)
tools
Build cross-platform VoIP calling apps with React Native using Telnyx Voice SDK. High-level reactive API with automatic lifecycle management, CallKit/ConnectionService integration, and push notifications. Use for mobile VoIP apps with minimal setup.
tools
Build browser-based VoIP calling apps using Telnyx WebRTC JavaScript SDK. Covers authentication, voice calls, events, debugging, call quality metrics, and AI Agent integration. Use for web-based real-time communication.
tools
Build VoIP calling apps on iOS using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, CallKit integration, PushKit/APNS push notifications, call quality metrics, and AI Agent integration. Use when implementing real-time voice communication on iOS.
tools
Build cross-platform VoIP calling apps with Flutter using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, push notifications (FCM + APNS), call quality metrics, and AI Agent integration. Works on Android, iOS, and Web.