api/go/telnyx-sip-integrations-go/SKILL.md
Manage call recordings, media storage, Dialogflow integration, and external connections for SIP trunking. This skill provides Go SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-sip-integrations-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 a list of your call recordings.
GET /recordings
page, err := client.Recordings.List(context.TODO(), telnyx.RecordingListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Retrieves the details of an existing call recording.
GET /recordings/{recording_id}
recording, err := client.Recordings.Get(context.TODO(), "recording_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", recording.Data)
Permanently deletes a call recording.
DELETE /recordings/{recording_id}
recording, err := client.Recordings.Delete(context.TODO(), "recording_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", recording.Data)
Permanently deletes a list of call recordings.
POST /recordings/actions/delete
err := client.Recordings.Actions.Delete(context.TODO(), telnyx.RecordingActionDeleteParams{
IDs: []string{"428c31b6-7af4-4bcb-b7f5-5013ef9657c1", "428c31b6-7af4-4bcb-b7f5-5013ef9657c2"},
})
if err != nil {
panic(err.Error())
}
Returns a list of your recording transcriptions.
GET /recording_transcriptions
recordingTranscriptions, err := client.RecordingTranscriptions.List(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", recordingTranscriptions.Data)
Retrieves the details of an existing recording transcription.
GET /recording_transcriptions/{recording_transcription_id}
recordingTranscription, err := client.RecordingTranscriptions.Get(context.TODO(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", recordingTranscription.Data)
Permanently deletes a recording transcription.
DELETE /recording_transcriptions/{recording_transcription_id}
recordingTranscription, err := client.RecordingTranscriptions.Delete(context.TODO(), "6a09cdc3-8948-47f0-aa62-74ac943d6c58")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", recordingTranscription.Data)
Returns the information about custom storage credentials.
GET /custom_storage_credentials/{connection_id}
customStorageCredential, err := client.CustomStorageCredentials.Get(context.TODO(), "connection_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", customStorageCredential.ConnectionID)
Creates a custom storage credentials configuration.
POST /custom_storage_credentials/{connection_id}
customStorageCredential, err := client.CustomStorageCredentials.New(
context.TODO(),
"connection_id",
telnyx.CustomStorageCredentialNewParams{
CustomStorageConfiguration: telnyx.CustomStorageConfigurationParam{
Backend: telnyx.CustomStorageConfigurationBackendGcs,
Configuration: telnyx.CustomStorageConfigurationConfigurationUnionParam{
OfGcs: &telnyx.GcsConfigurationDataParam{
Backend: telnyx.GcsConfigurationDataBackendGcs,
},
},
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", customStorageCredential.ConnectionID)
Updates a stored custom credentials configuration.
PUT /custom_storage_credentials/{connection_id}
customStorageCredential, err := client.CustomStorageCredentials.Update(
context.TODO(),
"connection_id",
telnyx.CustomStorageCredentialUpdateParams{
CustomStorageConfiguration: telnyx.CustomStorageConfigurationParam{
Backend: telnyx.CustomStorageConfigurationBackendGcs,
Configuration: telnyx.CustomStorageConfigurationConfigurationUnionParam{
OfGcs: &telnyx.GcsConfigurationDataParam{
Backend: telnyx.GcsConfigurationDataBackendGcs,
},
},
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", customStorageCredential.ConnectionID)
Deletes a stored custom credentials configuration.
DELETE /custom_storage_credentials/{connection_id}
err := client.CustomStorageCredentials.Delete(context.TODO(), "connection_id")
if err != nil {
panic(err.Error())
}
Return details of the Dialogflow connection associated with the given CallControl connection.
GET /dialogflow_connections/{connection_id}
dialogflowConnection, err := client.DialogflowConnections.Get(context.TODO(), "connection_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", dialogflowConnection.Data)
Save Dialogflow Credentiails to Telnyx, so it can be used with other Telnyx services.
POST /dialogflow_connections/{connection_id}
dialogflowConnection, err := client.DialogflowConnections.New(
context.TODO(),
"connection_id",
telnyx.DialogflowConnectionNewParams{
ServiceAccount: map[string]any{
"type": "bar",
"project_id": "bar",
"private_key_id": "bar",
"private_key": "bar",
"client_email": "bar",
"client_id": "bar",
"auth_uri": "bar",
"token_uri": "bar",
"auth_provider_x509_cert_url": "bar",
"client_x509_cert_url": "bar",
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", dialogflowConnection.Data)
Updates a stored Dialogflow Connection.
PUT /dialogflow_connections/{connection_id}
dialogflowConnection, err := client.DialogflowConnections.Update(
context.TODO(),
"connection_id",
telnyx.DialogflowConnectionUpdateParams{
ServiceAccount: map[string]any{
"type": "bar",
"project_id": "bar",
"private_key_id": "bar",
"private_key": "bar",
"client_email": "bar",
"client_id": "bar",
"auth_uri": "bar",
"token_uri": "bar",
"auth_provider_x509_cert_url": "bar",
"client_x509_cert_url": "bar",
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", dialogflowConnection.Data)
Deletes a stored Dialogflow Connection.
DELETE /dialogflow_connections/{connection_id}
err := client.DialogflowConnections.Delete(context.TODO(), "connection_id")
if err != nil {
panic(err.Error())
}
This endpoint returns a list of your External Connections inside the 'data' attribute of the response.
GET /external_connections
page, err := client.ExternalConnections.List(context.TODO(), telnyx.ExternalConnectionListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Creates a new External Connection based on the parameters sent in the request.
POST /external_connections — Required: external_sip_connection, outbound
externalConnection, err := client.ExternalConnections.New(context.TODO(), telnyx.ExternalConnectionNewParams{
ExternalSipConnection: telnyx.ExternalConnectionNewParamsExternalSipConnectionZoom,
Outbound: telnyx.ExternalConnectionNewParamsOutbound{},
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", externalConnection.Data)
Return the details of an existing External Connection inside the 'data' attribute of the response.
GET /external_connections/{id}
externalConnection, err := client.ExternalConnections.Get(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", externalConnection.Data)
Updates settings of an existing External Connection based on the parameters of the request.
PATCH /external_connections/{id} — Required: outbound
externalConnection, err := client.ExternalConnections.Update(
context.TODO(),
"id",
telnyx.ExternalConnectionUpdateParams{
Outbound: telnyx.ExternalConnectionUpdateParamsOutbound{
OutboundVoiceProfileID: "outbound_voice_profile_id",
},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", externalConnection.Data)
Permanently deletes an External Connection.
DELETE /external_connections/{id}
externalConnection, err := client.ExternalConnections.Delete(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", externalConnection.Data)
Returns the civic addresses and locations from Microsoft Teams.
GET /external_connections/{id}/civic_addresses
civicAddresses, err := client.ExternalConnections.CivicAddresses.List(
context.TODO(),
"id",
telnyx.ExternalConnectionCivicAddressListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", civicAddresses.Data)
Return the details of an existing Civic Address with its Locations inside the 'data' attribute of the response.
GET /external_connections/{id}/civic_addresses/{address_id}
civicAddress, err := client.ExternalConnections.CivicAddresses.Get(
context.TODO(),
"318fb664-d341-44d2-8405-e6bfb9ced6d9",
telnyx.ExternalConnectionCivicAddressGetParams{
ID: "id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", civicAddress.Data)
PATCH /external_connections/{id}/locations/{location_id} — Required: static_emergency_address_id
response, err := client.ExternalConnections.UpdateLocation(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.ExternalConnectionUpdateLocationParams{
ID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
StaticEmergencyAddressID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Returns a list of all active phone numbers associated with the given external connection.
GET /external_connections/{id}/phone_numbers
page, err := client.ExternalConnections.PhoneNumbers.List(
context.TODO(),
"id",
telnyx.ExternalConnectionPhoneNumberListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Return the details of a phone number associated with the given external connection.
GET /external_connections/{id}/phone_numbers/{phone_number_id}
phoneNumber, err := client.ExternalConnections.PhoneNumbers.Get(
context.TODO(),
"1234567889",
telnyx.ExternalConnectionPhoneNumberGetParams{
ID: "id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", phoneNumber.Data)
Asynchronously update settings of the phone number associated with the given external connection.
PATCH /external_connections/{id}/phone_numbers/{phone_number_id}
phoneNumber, err := client.ExternalConnections.PhoneNumbers.Update(
context.TODO(),
"1234567889",
telnyx.ExternalConnectionPhoneNumberUpdateParams{
ID: "id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", phoneNumber.Data)
Returns a list of your Releases for the given external connection.
GET /external_connections/{id}/releases
page, err := client.ExternalConnections.Releases.List(
context.TODO(),
"id",
telnyx.ExternalConnectionReleaseListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Return the details of a Release request and its phone numbers.
GET /external_connections/{id}/releases/{release_id}
release, err := client.ExternalConnections.Releases.Get(
context.TODO(),
"7b6a6449-b055-45a6-81f6-f6f0dffa4cc6",
telnyx.ExternalConnectionReleaseGetParams{
ID: "id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", release.Data)
Returns a list of your Upload requests for the given external connection.
GET /external_connections/{id}/uploads
page, err := client.ExternalConnections.Uploads.List(
context.TODO(),
"id",
telnyx.ExternalConnectionUploadListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Creates a new Upload request to Microsoft teams with the included phone numbers.
POST /external_connections/{id}/uploads — Required: number_ids
upload, err := client.ExternalConnections.Uploads.New(
context.TODO(),
"id",
telnyx.ExternalConnectionUploadNewParams{
NumberIDs: []string{"3920457616934164700", "3920457616934164701", "3920457616934164702", "3920457616934164703"},
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", upload.TicketID)
Forces a recheck of the status of all pending Upload requests for the given external connection in the background.
POST /external_connections/{id}/uploads/refresh
response, err := client.ExternalConnections.Uploads.RefreshStatus(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Success)
Returns the count of all pending upload requests for the given external connection.
GET /external_connections/{id}/uploads/status
response, err := client.ExternalConnections.Uploads.PendingCount(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Return the details of an Upload request and its phone numbers.
GET /external_connections/{id}/uploads/{ticket_id}
upload, err := client.ExternalConnections.Uploads.Get(
context.TODO(),
"7b6a6449-b055-45a6-81f6-f6f0dffa4cc6",
telnyx.ExternalConnectionUploadGetParams{
ID: "id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", upload.Data)
If there were any errors during the upload process, this endpoint will retry the upload request.
POST /external_connections/{id}/uploads/{ticket_id}/retry
response, err := client.ExternalConnections.Uploads.Retry(
context.TODO(),
"7b6a6449-b055-45a6-81f6-f6f0dffa4cc6",
telnyx.ExternalConnectionUploadRetryParams{
ID: "id",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Retrieve a list of log messages for all external connections associated with your account.
GET /external_connections/log_messages
page, err := client.ExternalConnections.LogMessages.List(context.TODO(), telnyx.ExternalConnectionLogMessageListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
Retrieve a log message for an external connection associated with your account.
GET /external_connections/log_messages/{id}
logMessage, err := client.ExternalConnections.LogMessages.Get(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", logMessage.LogMessages)
Dismiss a log message for an external connection associated with your account.
DELETE /external_connections/log_messages/{id}
response, err := client.ExternalConnections.LogMessages.Dismiss(context.TODO(), "id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Success)
This endpoint will make an asynchronous request to refresh the Operator Connect integration with Microsoft Teams for the current user.
POST /operator_connect/actions/refresh
response, err := client.OperatorConnect.Actions.Refresh(context.TODO())
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Message)
Returns a list of stored media files.
GET /media
media, err := client.Media.List(context.TODO(), telnyx.MediaListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", media.Data)
Upload media file to Telnyx so it can be used with other Telnyx services
POST /media — Required: media_url
response, err := client.Media.Upload(context.TODO(), telnyx.MediaUploadParams{
MediaURL: "http://www.example.com/audio.mp3",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
Returns the information about a stored media file.
GET /media/{media_name}
media, err := client.Media.Get(context.TODO(), "media_name")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", media.Data)
Updates a stored media file.
PUT /media/{media_name}
media, err := client.Media.Update(
context.TODO(),
"media_name",
telnyx.MediaUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", media.Data)
Deletes a stored media file.
DELETE /media/{media_name}
err := client.Media.Delete(context.TODO(), "media_name")
if err != nil {
panic(err.Error())
}
Downloads a stored media file.
GET /media/{media_name}/download
response, err := client.Media.Download(context.TODO(), "media_name")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response)
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.