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-ruby --agent claude-code
Codex
$ npx skills add team-telnyx/ai --skill telnyx-messaging-ruby -a codex -y
Cursor
$ npx skills add team-telnyx/ai --skill telnyx-messaging-ruby -a cursor -y
Gemini CLI
$ npx skills add team-telnyx/ai --skill telnyx-messaging-ruby -a gemini-cli -y
GitHub Copilot
$ npx skills add team-telnyx/ai --skill telnyx-messaging-ruby -a github-copilot -y
OpenCode
$ npx skills add team-telnyx/ai --skill telnyx-messaging-ruby -a opencode -y
Windsurf
$ npx skills add team-telnyx/ai --skill telnyx-messaging-ruby -a windsurf -y
name: telnyx-messaging-ruby 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: ruby generated_by: telnyx-openapi-pipeline contract: v2
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
gem install telnyx
require "telnyx" client = Telnyx::Client.new( api_key: ENV["TELNYX_API_KEY"], # This is the default and can be omitted public_key: ENV["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:
begin
response = client.messages.send_(to: "+18445550001", from: "+18005550101", text: "Hello from Telnyx!")
puts(response)
rescue Telnyx::Errors::APIConnectionError
puts "Network error — check connectivity and retry"
raise
rescue Telnyx::Errors::RateLimitError
# 429: rate limited — wait, then retry the request (bounded exponential backoff)
sleep(1) # Check Retry-After header for actual delay
# ...retry the call here (give up after a few attempts); otherwise re-raise:
raise
rescue Telnyx::Errors::APIStatusError => e
puts "API error #{e.status}: #{e.message}"
if e.status == 422
puts "Validation error — check required fields and formats"
end
raise # A failed request must never look like success to the caller
endCommon 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. | | `messaging_profile_id` | string (UUID) | No | Unique identifier for a messaging profile. | | `media_urls` | array[string] | No | A list of media URLs. | | `webhook_url` | 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 = client.messages.send_(to: "+18445550001", from: "+18005550101", text: "Hello from Telnyx!") puts(response)
Primary response fields:
Common sender variant that requires different request shape.
`client.messages.send_with_alphanumeric_sender()` — `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. | | `messaging_profile_id` | string (UUID) | Yes | The messaging profile ID to use. | | `webhook_url` | string (URL) | No | Callback URL for delivery status updates. | | `webhook_failover_url` | string (URL) | No | Failover callback URL for delivery status updates. | | `use_profile_webhooks` | boolean | No | If true, use the messaging profile's webhook settings. | | ... | | | +1 optional params in [references/api-details.md](references/api-details.md) |
response = client.messages.send_with_alphanumeric_sender( from: "MyCompany", messaging_profile_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", text: "Hello from Telnyx!", to: "+13125550001" ) puts(response)
Primary response fields:
---
Telnyx signs webhooks with Ed25519. Each request includes `telnyx-signature-ed25519` and `telnyx-timestamp` headers. Always verify signatures in production:
Verification needs
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.