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.
$ npx -y skills add team-telnyx/ai --skill telnyx-messaging-ruby --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/telnyx-messaging-rubyContext preview
The summary Claude sees to decide when to auto-load this skill.
Send and receive SMS/MMS, handle opt-outs and delivery webhooks. Use for notifications, 2FA, or messaging apps.
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 )
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:
response = client.messages.send_(to: "+18445550001", from: "+18005550101", text: "Hello from Telnyx!") puts(response)
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. | | `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. | | ... | | | +7 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 (E.164) | 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. |
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:
# In your webhook handler (e.g., Sinatra — use raw body):
post "/webhooks" do
payload = request.body.read
headers = {
"telnyx-signature-ed25519" => request.env["HTTP_TELNYX_SIGNATURE_ED25519"],
"telnyx-timestamp" => request.env["HTTP_TELNYX_TIMESTAMP"],
}
begin
event = client.webhooks.unwrap(payload, headers)
rescue => e
halt 400, "Invalid signature: #{e.message}"
end
# Signature valid — event is the parsed webhook payload
puts "Received event: #{event.data.event_type}"
status 200
endThese webhook payload fields are inline because they are part of the primary integration path.
| Field | Type | Description | |-------|------|-------------| | `data.event_type` | enum: message.sent, message.finalized | The type of event being delivered. | | `d
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.
Repo: team-telnyx/ai
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.