telnyx-ai-assistants-c…
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
Send and receive SMS/MMS, handle opt-outs and delivery webhooks. Use for notifications, 2FA, or messaging apps.
Claude Code
$ npx -y skills add team-telnyx/ai --skill telnyx-messaging-go --agent claude-code
Codex
$ npx skills add team-telnyx/ai --skill telnyx-messaging-go -a codex -y
Cursor
$ npx skills add team-telnyx/ai --skill telnyx-messaging-go -a cursor -y
Gemini CLI
$ npx skills add team-telnyx/ai --skill telnyx-messaging-go -a gemini-cli -y
GitHub Copilot
$ npx skills add team-telnyx/ai --skill telnyx-messaging-go -a github-copilot -y
OpenCode
$ npx skills add team-telnyx/ai --skill telnyx-messaging-go -a opencode -y
Windsurf
$ npx skills add team-telnyx/ai --skill telnyx-messaging-go -a windsurf -y
name: telnyx-messaging-go description: >- Send and receive SMS/MMS, handle opt-outs and delivery webhooks. Use for notifications, 2FA, or messaging apps. metadata: author: telnyx product: messaging language: go generated_by: telnyx-openapi-pipeline contract: v2
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
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")),
option.WithPublicKey(os.Getenv("TELNYX_PUBLIC_KEY")), // Required for client.Webhooks.Unwrap (webhook verification)
)All examples below assume `client` is already initialized as shown above.
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"
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:
// Rate limited — wait, then retry the request (bounded 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")
}
return err // Propagate: a failed request must never look like success to the caller
}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).
Do not invent Telnyx parameters, enums, response fields, or webhook fields.
Primary outbound messaging flow. Agents need exact request fields and delivery-related response fields.
`client.Messages.Send()` — `POST /messages`
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `To` | string (E.164) | Yes | Receiving address (+E.164 formatted phone number or short co... | | `From` | string (E.164) | Yes | Sending address (+E.164 formatted phone number, alphanumeric... | | `Text` | string | Yes | Message body (i.e., content) as a non-empty string. | | `MessagingProfileId` | string (UUID) | No | Unique identifier for a messaging profile. | | `MediaUrls` | array[string] | No | A list of media URLs. | | `WebhookUrl` | string (URL) | No | The URL where webhooks related to this message will be sent. | | ... | | | +8 optional params in [references/api-details.md](references/api-details.md) |
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:
Common sender variant that requires different request shape.
`client.Messages.SendWithAlphanumericSender()` — `POST /messages/alphanumeric_sender_id`
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `From` | string | Yes | A valid alphanumeric sender ID on the user's account. | | `To` | string (E.164) | Yes | Receiving address (+E.164 formatted phone number or short co... | | `Text` | string | Yes | The message body. | | `MessagingProfileId` | string (UUID) | Yes | The messaging profile ID to use. | | `WebhookUrl` | string (URL) | No | Callback URL for delivery status updates. | | `WebhookFailoverUrl` | string (URL) | No | Failover callback URL for delivery status updates. | | `UseProfileWebhooks` | boolean | No | If true, use the messaging profile's webhook settings. | | ... | | | +1 optional params in [references/api-details.md](references/api-details.md) |
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 {This repo is the one-stop shop for AI Agents and AI-first developers building with Telnyx — everything an agent needs to build production-grade applications and manage its account, from signup to funding.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
AI voice assistants with custom instructions, knowledge bases, and tool integrations.
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.