Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Create and manage messaging profiles with number pools, sticky sender, and geomatch features. Configure short codes for high-volume messaging. This skill provides Ruby SDK examples.
.claude/skills/team-telnyx-telnyx-messaging-profiles-ruby/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 114% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 247% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 57% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 198% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 299% | 0% |
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
bashgem install telnyx
rubyrequire "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:
rubybegin result = client.messages.send_(to: "+13125550001", from: "+13125550002", text: "Hello") rescue Telnyx::Errors::APIConnectionError puts "Network error — check connectivity and retry" rescue Telnyx::Errors::RateLimitError # 429: rate limited — wait and retry with exponential backoff sleep(1) # Check Retry-After header for actual delay 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 end
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).
.auto_paging_each for automatic iteration: page.auto_paging_each { |item| puts item.id }.GET /messaging_profiles
rubypage = client.messaging_profiles.list puts(page)
Returns: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), organization_id (string), record_type (enum: messaging_profile), redaction_enabled (boolean), redaction_level (integer), resource_group_id (string | null), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
POST /messaging_profiles — Required: name, whitelisted_destinations
Optional: ai_assistant_id (string | null), alpha_sender (string | null), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), number_pool_settings (object | null), resource_group_id (string | null), smart_encoding (boolean), url_shortener_settings (object | null), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url)
rubymessaging_profile = client.messaging_profiles.create(name: "My name", whitelisted_destinations: ["US"]) puts(messaging_profile)
Returns: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), organization_id (string), record_type (enum: messaging_profile), redaction_enabled (boolean), redaction_level (integer), resource_group_id (string | null), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
GET /messaging_profiles/{id}
rubymessaging_profile = client.messaging_profiles.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") puts(messaging_profile)
Returns: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), organization_id (string), record_type (enum: messaging_profile), redaction_enabled (boolean), redaction_level (integer), resource_group_id (string | null), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
PATCH /messaging_profiles/{id}
Optional: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), record_type (enum: messaging_profile), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
rubymessaging_profile = client.messaging_profiles.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") puts(messaging_profile)
Returns: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), organization_id (string), record_type (enum: messaging_profile), redaction_enabled (boolean), redaction_level (integer), resource_group_id (string | null), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
DELETE /messaging_profiles/{id}
rubymessaging_profile = client.messaging_profiles.delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") puts(messaging_profile)
Returns: ai_assistant_id (string | null), alpha_sender (string | null), created_at (date-time), daily_spend_limit (string), daily_spend_limit_enabled (boolean), enabled (boolean), health_webhook_url (url), id (uuid), mms_fall_back_to_sms (boolean), mms_transcoding (boolean), mobile_only (boolean), name (string), number_pool_settings (object | null), organization_id (string), record_type (enum: messaging_profile), redaction_enabled (boolean), redaction_level (integer), resource_group_id (string | null), smart_encoding (boolean), updated_at (date-time), url_shortener_settings (object | null), v1_secret (string), webhook_api_version (enum: 1, 2, 2010-04-01), webhook_failover_url (url), webhook_url (url), whitelisted_destinations (arraystring])
GET /messaging_profiles/{id}/phone_numbers
rubypage = client.messaging_profiles.list_phone_numbers("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") puts(page)
Returns: country_code (string), created_at (date-time), eligible_messaging_products (arraystring]), features (object), health (object), id (string), messaging_product (string), messaging_profile_id (string | null), organization_id (string), phone_number (string), record_type (enum: messaging_phone_number, messaging_settings), tags (arraystring]), traffic_type (string), type (enum: long-code, toll-free, short-code, longcode, tollfree, shortcode), updated_at (date-time)
GET /messaging_profiles/{id}/short_codes
rubypage = client.messaging_profiles.list_short_codes("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") puts(page)
Returns: country_code (string), created_at (date-time), id (uuid), messaging_profile_id (string | null), record_type (enum: short_code), short_code (string), tags (array), updated_at (date-time)
GET /short_codes
rubypage = client.short_codes.list puts(page)
Returns: country_code (string), created_at (date-time), id (uuid), messaging_profile_id (string | null), record_type (enum: short_code), short_code (string), tags (array), updated_at (date-time)
GET /short_codes/{id}
rubyshort_code = client.short_codes.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e") puts(short_code)
Returns: country_code (string), created_at (date-time), id (uuid), messaging_profile_id (string | null), record_type (enum: short_code), short_code (string), tags (array), updated_at (date-time)
Update the settings for a specific short code. To unbind a short code from a profile, set the messaging_profile_id to null or an empty string. To add or update tags, include the tags field as an array of strings.
PATCH /short_codes/{id} — Required: messaging_profile_id
Optional: tags (array)
rubyshort_code = client.short_codes.update( "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", messaging_profile_id: "abc85f64-5717-4562-b3fc-2c9600000000" ) puts(short_code)
Returns: country_code (string), created_at (date-time), id (uuid), messaging_profile_id (string | null), record_type (enum: short_code), short_code (string), tags (array), updated_at (date-time)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 11,324 | 6,011 | -47% | 1 | 1 | 0% | 2,251 | 4,808 | +114% | 0 | 0 | — |
case-02 | fail→pass | 5,723 | 3,152 | -45% | 1 | 1 | 0% | 1,195 | 4,151 | +247% | 0 | 0 | — |
case-03 | fail→pass | 13,688 | 14,522 | +6% | 1 | 1 | 0% | 2,698 | 4,235 | +57% | 0 | 0 | — |
case-04 | fail→pass | 7,611 | 3,713 | -51% | 1 | 1 | 0% | 1,383 | 4,120 | +198% | 0 | 0 | — |
case-05 | fail→pass | 4,933 | 2,443 | -50% | 1 | 1 | 0% | 998 | 3,982 | +299% | 0 | 0 | — |
case-06 | fail→pass | 6,093 | 2,975 | -51% | 1 | 1 | 0% | 1,193 | 4,090 | +243% | 0 | 0 | — |
case-07 | fail→pass | 4,780 | 3,094 | -35% | 1 | 1 | 0% | 954 | 4,048 | +324% | 0 | 0 | — |
case-08 | fail→pass | 6,204 | 4,105 | -34% | 1 | 1 | 0% | 1,254 | 4,281 | +241% | 0 | 0 | — |
case-09 | fail→pass | 7,404 | 3,849 | -48% | 1 | 1 | 0% | 1,258 | 4,203 | +234% | 0 | 0 | — |
case-10 | fail→pass | 9,559 | 2,472 | -74% | 1 | 1 | 0% | 1,946 | 3,939 | +102% | 0 | 0 | — |
case-11 | fail→pass | 6,619 | 3,913 | -41% | 1 | 1 | 0% | 1,458 | 4,335 | +197% | 0 | 0 | — |
case-12 | fail→pass | 21,593 | 3,689 | -83% | 1 | 1 | 0% | 1,880 | 4,163 | +121% | 0 | 0 | — |
case-13 | fail→pass | 11,118 | 5,016 | -55% | 1 | 1 | 0% | 2,067 | 4,355 | +111% | 0 | 0 | — |
case-14 | fail→pass | 5,268 | 1,654 | -69% | 1 | 1 | 0% | 954 | 3,747 | +293% | 0 | 0 | — |
case-15 | fail→pass | 13,473 | 2,539 | -81% | 1 | 1 | 0% | 2,387 | 3,916 | +64% | 0 | 0 | — |
case-16 | fail→pass | 7,727 | 1,797 | -77% | 1 | 1 | 0% | 1,434 | 3,764 | +162% | 0 | 0 | — |
case-17 | fail→pass | 8,242 | 3,786 | -54% | 1 | 1 | 0% | 1,636 | 4,299 | +163% | 0 | 0 | — |
case-18 | fail→pass | 9,521 | 2,116 | -78% | 1 | 1 | 0% | 1,656 | 3,884 | +135% | 0 | 0 | — |
case-19 | pass→pass | 6,277 | 2,757 | -56% | 1 | 1 | 0% | 1,119 | 3,975 | +255% | 0 | 0 | — |
case-20 | fail→pass | 4,311 | 4,873 | +13% | 1 | 1 | 0% | 828 | 4,484 | +442% | 0 | 0 | — |
case-21 | pass→pass | 10,601 | 25,686 | +142% | 1 | 1 | 0% | 2,049 | 4,792 | +134% | 0 | 0 | — |
case-22 | pass→pass | 15,556 | 15,456 | -1% | 1 | 1 | 0% | 2,999 | 6,417 | +114% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +86 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.