Logo di Telnyx Messaging Go

Telnyx Messaging Go

Organizzazione
team-telnyx
telnyx-messaging-go

Send and receive SMS/MMS, handle opt-outs and delivery webhooks. Use for notifications, 2FA, or messaging apps.

Add to TypingMind

Panoramica

Pubblicato dateam-telnyx
Repositoryai
Nome della skilltelnyx-messaging-go
Stelle
217
Fork
21
File inclusi
1
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 1

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da team-telnyx su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Telnyx Messaging Go in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/team-telnyx/ai/tree/main/providers/claude/plugins/telnyx-messaging/skills/telnyx-messaging-go
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/team-telnyx/ai.git /tmp/ai
mkdir -p .claude/skills
cp -r /tmp/ai/providers/claude/plugins/telnyx-messaging/skills/telnyx-messaging-go .claude/skills/telnyx-messaging-go
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Telnyx Messaging Go in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Telnyx Messaging Go non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Telnyx Messaging Go non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Telnyx Messaging - Go

Installation

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

Setup

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.

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:

go
import "errors"

response, err := client.Messages.Send(context.Background(), telnyx.MessageSendParams{
		To: "+18445550001",
		From: "+18005550101",
		Text: "Hello from Telnyx!",
	})
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:
      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

  • Phone numbers must be in E.164 format (e.g., +13125550001). Include the + prefix and country code. No spaces, dashes, or parentheses.
  • Pagination: Use ListAutoPaging() for automatic iteration: iter := client.Resource.ListAutoPaging(ctx, params); for iter.Next() { item := iter.Current() }.

Operational Caveats

  • The sending number must already be assigned to the correct messaging profile before you send traffic from it.
  • US A2P long-code traffic must complete 10DLC registration before production sending or carriers will block or heavily filter messages.
  • Delivery webhooks are asynchronous. Treat the send response as acceptance of the request, not final carrier delivery.

Reference Use Rules

Do not invent Telnyx parameters, enums, response fields, or webhook fields.

Core Tasks

Send an SMS

Primary outbound messaging flow. Agents need exact request fields and delivery-related response fields.

client.Messages.Send() — POST /messages

ParameterTypeRequiredDescription
Tostring (E.164)YesReceiving address (+E.164 formatted phone number or short co...
Fromstring (E.164)YesSending address (+E.164 formatted phone number, alphanumeric...
TextstringYesMessage body (i.e., content) as a non-empty string.
MessagingProfileIdstring (UUID)NoUnique identifier for a messaging profile.
MediaUrlsarray[string]NoA list of media URLs.
WebhookUrlstring (URL)NoThe URL where webhooks related to this message will be sent.
...+7 optional params in references/api-details.md
go
	response, err := client.Messages.Send(context.Background(), telnyx.MessageSendParams{
		To: "+18445550001",
		From: "+18005550101",
		Text: "Hello from Telnyx!",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response.Data)

Primary response fields:

  • response.Data.ID
  • response.Data.To
  • response.Data.From
  • response.Data.Text
  • response.Data.SentAt
  • response.Data.Errors

Send an SMS with an alphanumeric sender ID

Common sender variant that requires different request shape.

client.Messages.SendWithAlphanumericSender() — POST /messages/alphanumeric_sender_id

ParameterTypeRequiredDescription
Fromstring (E.164)YesA valid alphanumeric sender ID on the user's account.
Tostring (E.164)YesReceiving address (+E.164 formatted phone number or short co...
TextstringYesThe message body.
MessagingProfileIdstring (UUID)YesThe messaging profile ID to use.
WebhookUrlstring (URL)NoCallback URL for delivery status updates.
WebhookFailoverUrlstring (URL)NoFailover callback URL for delivery status updates.
UseProfileWebhooksbooleanNoIf true, use the messaging profile's webhook settings.
go
	response, err := client.Messages.SendWithAlphanumericSender(context.Background(), telnyx.MessageSendWithAlphanumericSenderParams{
		From:               "MyCompany",
		MessagingProfileID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
		Text: "Hello from Telnyx!",
		To: "+13125550001",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response.Data)

Primary response fields:

  • response.Data.ID
  • response.Data.To
  • response.Data.From
  • response.Data.Text
  • response.Data.SentAt
  • response.Data.Errors

Webhook Verification

Telnyx signs webhooks with Ed25519. Each request includes telnyx-signature-ed25519 and telnyx-timestamp headers. Always verify signatures in production:

go
// In your webhook handler:
func handleWebhook(w http.ResponseWriter, r *http.Request) {
  body, _ := io.ReadAll(r.Body)
  event, err := client.Webhooks.Unwrap(body, r.Header)
  if err != nil {
    http.Error(w, "Invalid signature", http.StatusBadRequest)
    return
  }
  // Signature valid — event is the parsed webhook payload
  fmt.Println("Received event:", event.Data.EventType)
  w.WriteHeader(http.StatusOK)
}

Webhooks

These webhook payload fields are inline because they are part of the primary integration path.

Delivery Update

FieldTypeDescription
data.event_typeenum: message.sent, message.finalizedThe type of event being delivered.
data.payload.iduuidIdentifies the type of resource.
data.payload.toarray[object]
data.payload.textstringMessage body (i.e., content) as a non-empty string.
data.payload.sent_atdate-timeISO 8601 formatted date indicating when the message was sent.
data.payload.completed_atdate-timeISO 8601 formatted date indicating when the message was finalized.
data.payload.costobject | null
data.payload.errorsarray[object]These errors may point at addressees when referring to unsuccessful/unconfirm...

Inbound Message

FieldTypeDescription
data.event_typeenum: message.receivedThe type of event being delivered.
data.payload.iduuidIdentifies the type of resource.
data.payload.directionenum: inboundThe direction of the message.
data.payload.toarray[object]
data.payload.textstringMessage body (i.e., content) as a non-empty string.
data.payload.typeenum: SMS, MMSThe type of message.
data.payload.mediaarray[object]
data.record_typeenum: eventIdentifies the type of the resource.

If you need webhook fields that are not listed inline here, read the webhook payload reference before writing the handler.


Important Supporting Operations

Use these when the core tasks above are close to your flow, but you need a common variation or follow-up step.

Send a group MMS message

Send one MMS payload to multiple recipients.

client.Messages.SendGroupMms() — POST /messages/group_mms

ParameterTypeRequiredDescription
Fromstring (E.164)YesPhone number, in +E.164 format, used to send the message.
Toarray[object]YesA list of destinations.
MediaUrlsarray[string]NoA list of media URLs.
WebhookUrlstring (URL)NoThe URL where webhooks related to this message will be sent.
WebhookFailoverUrlstring (URL)NoThe failover URL where webhooks related to this message will...
...+3 optional params in references/api-details.md
go
	response, err := client.Messages.SendGroupMms(context.Background(), telnyx.MessageSendGroupMmsParams{
		From: "+13125551234",
		To:   []string{"+18655551234", "+14155551234"},
		Text: "Hello from Telnyx!",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response.Data)

Primary response fields:

  • response.Data.ID
  • response.Data.To
  • response.Data.From
  • response.Data.Type
  • response.Data.Direction
  • response.Data.Text

Send a long code message

Force a long-code sending path instead of the generic send endpoint.

client.Messages.SendLongCode() — POST /messages/long_code

ParameterTypeRequiredDescription
Fromstring (E.164)YesPhone number, in +E.164 format, used to send the message.
Tostring (E.164)YesReceiving address (+E.164 formatted phone number or short co...
MediaUrlsarray[string]NoA list of media URLs.
WebhookUrlstring (URL)NoThe URL where webhooks related to this message will be sent.
WebhookFailoverUrlstring (URL)NoThe failover URL where webhooks related to this message will...
...+6 optional params in references/api-details.md
go
	response, err := client.Messages.SendLongCode(context.Background(), telnyx.MessageSendLongCodeParams{
		From: "+18445550001",
		To:   "+13125550002",
		Text: "Hello from Telnyx!",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response.Data)

Primary response fields:

  • response.Data.ID
  • response.Data.To
  • response.Data.From
  • response.Data.Type
  • response.Data.Direction
  • response.Data.Text

Send a message using number pool

Let a messaging profile or number pool choose the sender for you.

client.Messages.SendNumberPool() — POST /messages/number_pool

ParameterTypeRequiredDescription
MessagingProfileIdstring (UUID)YesUnique identifier for a messaging profile.
Tostring (E.164)YesReceiving address (+E.164 formatted phone number or short co...
MediaUrlsarray[string]NoA list of media URLs.
WebhookUrlstring (URL)NoThe URL where webhooks related to this message will be sent.
WebhookFailoverUrlstring (URL)NoThe failover URL where webhooks related to this message will...
...+6 optional params in references/api-details.md
go
	response, err := client.Messages.SendNumberPool(context.Background(), telnyx.MessageSendNumberPoolParams{
		MessagingProfileID: "abc85f64-5717-4562-b3fc-2c9600000000",
		To:                 "+13125550002",
		Text: "Hello from Telnyx!",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response.Data)

Primary response fields:

  • response.Data.ID
  • response.Data.To
  • response.Data.From
  • response.Data.Type
  • response.Data.Direction
  • response.Data.Text

Send a short code message

Force a short-code sending path when the sender must be a short code.

client.Messages.SendShortCode() — POST /messages/short_code

ParameterTypeRequiredDescription
Fromstring (E.164)YesPhone number, in +E.164 format, used to send the message.
Tostring (E.164)YesReceiving address (+E.164 formatted phone number or short co...
MediaUrlsarray[string]NoA list of media URLs.
WebhookUrlstring (URL)NoThe URL where webhooks related to this message will be sent.
WebhookFailoverUrlstring (URL)NoThe failover URL where webhooks related to this message will...
...+6 optional params in references/api-details.md
go
	response, err := client.Messages.SendShortCode(context.Background(), telnyx.MessageSendShortCodeParams{
		From: "+18445550001",
		To:   "+18445550001",
		Text: "Hello from Telnyx!",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response.Data)

Primary response fields:

  • response.Data.ID
  • response.Data.To
  • response.Data.From
  • response.Data.Type
  • response.Data.Direction
  • response.Data.Text

Schedule a message

Queue a message for future delivery instead of sending immediately.

client.Messages.Schedule() — POST /messages/schedule

ParameterTypeRequiredDescription
Tostring (E.164)YesReceiving address (+E.164 formatted phone number or short co...
MessagingProfileIdstring (UUID)NoUnique identifier for a messaging profile.
MediaUrlsarray[string]NoA list of media URLs.
WebhookUrlstring (URL)NoThe URL where webhooks related to this message will be sent.
...+8 optional params in references/api-details.md
go
	response, err := client.Messages.Schedule(context.Background(), telnyx.MessageScheduleParams{
		To: "+18445550001",
		From: "+18005550101",
		Text: "Appointment reminder",
		SendAt: "2025-07-01T15:00:00Z",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response.Data)

Primary response fields:

  • response.Data.ID
  • response.Data.To
  • response.Data.From
  • response.Data.Type
  • response.Data.Direction
  • response.Data.Text

Send a WhatsApp message

Send WhatsApp traffic instead of SMS/MMS.

client.Messages.SendWhatsapp() — POST /messages/whatsapp

ParameterTypeRequiredDescription
Fromstring (E.164)YesPhone number in +E.164 format associated with Whatsapp accou...
Tostring (E.164)YesPhone number in +E.164 format
WhatsappMessageobjectYes
Typeenum (WHATSAPP)NoMessage type - must be set to "WHATSAPP"
WebhookUrlstring (URL)NoThe URL where webhooks related to this message will be sent.
MessagingProfileIdstring (UUID)NoMessaging profile ID - required if the 'from' number is not ...
go
	response, err := client.Messages.SendWhatsapp(context.Background(), telnyx.MessageSendWhatsappParams{
		From:            "+13125551234",
		To:              "+13125551234",
		WhatsappMessage: telnyx.WhatsappMessageContentParam{},
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", response.Data)

Primary response fields:

  • response.Data.ID
  • response.Data.To
  • response.Data.From
  • response.Data.Type
  • response.Data.Direction
  • response.Data.Body

Additional Operations

Use the core tasks above first. The operations below are indexed here with exact SDK methods and required params; use references/api-details.md for full optional params, response schemas, and lower-frequency webhook payloads. Before using any operation below, read the optional-parameters section and the response-schemas section so you do not guess missing fields.

OperationSDK methodEndpointUse whenRequired params
Retrieve a messageclient.Messages.Get()GET /messages/{id}Fetch the current state before updating, deleting, or making control-flow decisions.Id
Cancel a scheduled messageclient.Messages.CancelScheduled()DELETE /messages/{id}Remove, detach, or clean up an existing resource.Id
List alphanumeric sender IDsclient.AlphanumericSenderIDs.List()GET /alphanumeric_sender_idsInspect available resources or choose an existing resource before mutating it.None
Create an alphanumeric sender IDclient.AlphanumericSenderIDs.New()POST /alphanumeric_sender_idsCreate or provision an additional resource when the core tasks do not cover this flow.AlphanumericSenderId, MessagingProfileId
Retrieve an alphanumeric sender IDclient.AlphanumericSenderIDs.Get()GET /alphanumeric_sender_ids/{id}Fetch the current state before updating, deleting, or making control-flow decisions.Id
Delete an alphanumeric sender IDclient.AlphanumericSenderIDs.Delete()DELETE /alphanumeric_sender_ids/{id}Remove, detach, or clean up an existing resource.Id
Retrieve group MMS messagesclient.Messages.GetGroupMessages()GET /messages/group/{message_id}Fetch the current state before updating, deleting, or making control-flow decisions.MessageId
List messaging hosted numbersclient.MessagingHostedNumbers.List()GET /messaging_hosted_numbersInspect available resources or choose an existing resource before mutating it.None
Retrieve a messaging hosted numberclient.MessagingHostedNumbers.Get()GET /messaging_hosted_numbers/{id}Fetch the current state before updating, deleting, or making control-flow decisions.Id
Update a messaging hosted numberclient.MessagingHostedNumbers.Update()PATCH /messaging_hosted_numbers/{id}Modify an existing resource without recreating it.Id
List opt-outsclient.MessagingOptouts.List()GET /messaging_optoutsInspect available resources or choose an existing resource before mutating it.None
List high-level messaging profile metricsclient.MessagingProfileMetrics.List()GET /messaging_profile_metricsInspect available resources or choose an existing resource before mutating it.None
Regenerate messaging profile secretclient.MessagingProfiles.Actions.RegenerateSecret()POST /messaging_profiles/{id}/actions/regenerate_secretTrigger a follow-up action in an existing workflow rather than creating a new top-level resource.Id
List alphanumeric sender IDs for a messaging profileclient.MessagingProfiles.ListAlphanumericSenderIDs()GET /messaging_profiles/{id}/alphanumeric_sender_idsFetch the current state before updating, deleting, or making control-flow decisions.Id
Get detailed messaging profile metricsclient.MessagingProfiles.GetMetrics()GET /messaging_profiles/{id}/metricsFetch the current state before updating, deleting, or making control-flow decisions.Id
List Auto-Response Settingsclient.MessagingProfiles.AutorespConfigs.List()GET /messaging_profiles/{profile_id}/autoresp_configsFetch the current state before updating, deleting, or making control-flow decisions.ProfileId
Create auto-response settingclient.MessagingProfiles.AutorespConfigs.New()POST /messaging_profiles/{profile_id}/autoresp_configsCreate or provision an additional resource when the core tasks do not cover this flow.Op, Keywords, CountryCode, ProfileId
Get Auto-Response Settingclient.MessagingProfiles.AutorespConfigs.Get()GET /messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}Fetch the current state before updating, deleting, or making control-flow decisions.ProfileId, AutorespCfgId
Update Auto-Response Settingclient.MessagingProfiles.AutorespConfigs.Update()PUT /messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}Modify an existing resource without recreating it.Op, Keywords, CountryCode, ProfileId, +1 more
Delete Auto-Response Settingclient.MessagingProfiles.AutorespConfigs.Delete()DELETE /messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}Remove, detach, or clean up an existing resource.ProfileId, AutorespCfgId

Other Webhook Events

Eventdata.event_typeDescription
replacedLinkClickmessage.link_clickReplaced Link Click

For exhaustive optional parameters, full response schemas, and complete webhook payloads, see references/api-details.md.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Telnyx Messaging Go?

Send and receive SMS/MMS, handle opt-outs and delivery webhooks. Use for notifications, 2FA, or messaging apps.

Perché usare Telnyx Messaging Go su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Telnyx Messaging Go è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Telnyx Messaging Go in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/team-telnyx/ai/tree/main/providers/claude/plugins/telnyx-messaging/skills/telnyx-messaging-go. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Telnyx Messaging Go?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Telnyx Messaging Go?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Telnyx Messaging Go: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Telnyx Messaging Go è gratuita?

Sì. È pubblicata su GitHub da team-telnyx con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇