team-telnyx/telnyx-skills

telnyx-messaging-profiles-ruby

>- 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.

First seen Mar 7, 2026

Installation

$ npx skills add team-telnyx/telnyx-skills --skill telnyx-messaging-profiles-ruby

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from team-telnyx/telnyx-skills · top by installs.

npx skills add team-telnyx/telnyx-skills

Browse all from team-telnyx/telnyx-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 188
License LICENSE
Default branch main
Open issues 2
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

More metadata
author
telnyx
product
messaging-profiles
language
ruby
generated_by
telnyx-openapi-pipeline

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 10,531 B
  • docs SUMMARY.md 219 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 9 installs

SKILL.md

<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->

Telnyx Messaging Profiles - Ruby

Installation

gem install telnyx

Setup

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.

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:

begin
  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).

Important Notes

  • Pagination: Use .autopagingeach for automatic iteration: page.autopagingeach { |item| puts item.id }.

List messaging profiles

GET /messaging_profiles

page = client.messaging_profiles.list

puts(page)

Returns: aiassistantid (string | null), alphasender (string | null), createdat (date-time), dailyspendlimit (string), dailyspendlimitenabled (boolean), enabled (boolean), healthwebhookurl (url), id (uuid), mmsfallbacktosms (boolean), mmstranscoding (boolean), mobileonly (boolean), name (string), numberpoolsettings (object | null), organizationid (string), recordtype (enum: messagingprofile), redactionenabled (boolean), redactionlevel (integer), resourcegroupid (string | null), smartencoding (boolean), updatedat (date-time), urlshortenersettings (object | null), v1secret (string), webhookapiversion (enum: 1, 2, 2010-04-01), webhookfailoverurl (url), webhookurl (url), whitelisted_destinations (array[string])

Create a messaging profile

POST /messagingprofiles — Required: name, whitelisteddestinations

Optional: aiassistantid (string | null), alphasender (string | null), dailyspendlimit (string), dailyspendlimitenabled (boolean), enabled (boolean), healthwebhookurl (url), mmsfallbacktosms (boolean), mmstranscoding (boolean), mobileonly (boolean), numberpoolsettings (object | null), resourcegroupid (string | null), smartencoding (boolean), urlshortenersettings (object | null), webhookapiversion (enum: 1, 2, 2010-04-01), webhookfailoverurl (url), webhookurl (url)

messaging_profile = client.messaging_profiles.create(name: "My name", whitelisted_destinations: ["US"])

puts(messaging_profile)

Returns: aiassistantid (string | null), alphasender (string | null), createdat (date-time), dailyspendlimit (string), dailyspendlimitenabled (boolean), enabled (boolean), healthwebhookurl (url), id (uuid), mmsfallbacktosms (boolean), mmstranscoding (boolean), mobileonly (boolean), name (string), numberpoolsettings (object | null), organizationid (string), recordtype (enum: messagingprofile), redactionenabled (boolean), redactionlevel (integer), resourcegroupid (string | null), smartencoding (boolean), updatedat (date-time), urlshortenersettings (object | null), v1secret (string), webhookapiversion (enum: 1, 2, 2010-04-01), webhookfailoverurl (url), webhookurl (url), whitelisted_destinations (array[string])

Retrieve a messaging profile

GET /messaging_profiles/{id}

messaging_profile = client.messaging_profiles.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")

puts(messaging_profile)

Returns: aiassistantid (string | null), alphasender (string | null), createdat (date-time), dailyspendlimit (string), dailyspendlimitenabled (boolean), enabled (boolean), healthwebhookurl (url), id (uuid), mmsfallbacktosms (boolean), mmstranscoding (boolean), mobileonly (boolean), name (string), numberpoolsettings (object | null), organizationid (string), recordtype (enum: messagingprofile), redactionenabled (boolean), redactionlevel (integer), resourcegroupid (string | null), smartencoding (boolean), updatedat (date-time), urlshortenersettings (object | null), v1secret (string), webhookapiversion (enum: 1, 2, 2010-04-01), webhookfailoverurl (url), webhookurl (url), whitelisted_destinations (array[string])

Update a messaging profile

PATCH /messaging_profiles/{id}

Optional: aiassistantid (string | null), alphasender (string | null), createdat (date-time), dailyspendlimit (string), dailyspendlimitenabled (boolean), enabled (boolean), id (uuid), mmsfallbacktosms (boolean), mmstranscoding (boolean), mobileonly (boolean), name (string), numberpoolsettings (object | null), recordtype (enum: messagingprofile), smartencoding (boolean), updatedat (date-time), urlshortenersettings (object | null), v1secret (string), webhookapiversion (enum: 1, 2, 2010-04-01), webhookfailoverurl (url), webhookurl (url), whitelisteddestinations (array[string])

messaging_profile = client.messaging_profiles.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")

puts(messaging_profile)

Returns: aiassistantid (string | null), alphasender (string | null), createdat (date-time), dailyspendlimit (string), dailyspendlimitenabled (boolean), enabled (boolean), healthwebhookurl (url), id (uuid), mmsfallbacktosms (boolean), mmstranscoding (boolean), mobileonly (boolean), name (string), numberpoolsettings (object | null), organizationid (string), recordtype (enum: messagingprofile), redactionenabled (boolean), redactionlevel (integer), resourcegroupid (string | null), smartencoding (boolean), updatedat (date-time), urlshortenersettings (object | null), v1secret (string), webhookapiversion (enum: 1, 2, 2010-04-01), webhookfailoverurl (url), webhookurl (url), whitelisted_destinations (array[string])

Delete a messaging profile

DELETE /messaging_profiles/{id}

messaging_profile = client.messaging_profiles.delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")

puts(messaging_profile)

Returns: aiassistantid (string | null), alphasender (string | null), createdat (date-time), dailyspendlimit (string), dailyspendlimitenabled (boolean), enabled (boolean), healthwebhookurl (url), id (uuid), mmsfallbacktosms (boolean), mmstranscoding (boolean), mobileonly (boolean), name (string), numberpoolsettings (object | null), organizationid (string), recordtype (enum: messagingprofile), redactionenabled (boolean), redactionlevel (integer), resourcegroupid (string | null), smartencoding (boolean), updatedat (date-time), urlshortenersettings (object | null), v1secret (string), webhookapiversion (enum: 1, 2, 2010-04-01), webhookfailoverurl (url), webhookurl (url), whitelisted_destinations (array[string])

List phone numbers associated with a messaging profile

GET /messagingprofiles/{id}/phonenumbers

page = client.messaging_profiles.list_phone_numbers("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")

puts(page)

Returns: countrycode (string), createdat (date-time), eligiblemessagingproducts (array[string]), features (object), health (object), id (string), messagingproduct (string), messagingprofileid (string | null), organizationid (string), phonenumber (string), recordtype (enum: messagingphonenumber, messagingsettings), tags (array[string]), traffictype (string), type (enum: long-code, toll-free, short-code, longcode, tollfree, shortcode), updated_at (date-time)

List short codes associated with a messaging profile

GET /messagingprofiles/{id}/shortcodes

page = client.messaging_profiles.list_short_codes("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")

puts(page)

Returns: countrycode (string), createdat (date-time), id (uuid), messagingprofileid (string | null), recordtype (enum: shortcode), shortcode (string), tags (array), updatedat (date-time)

List short codes

GET /short_codes

page = client.short_codes.list

puts(page)

Returns: countrycode (string), createdat (date-time), id (uuid), messagingprofileid (string | null), recordtype (enum: shortcode), shortcode (string), tags (array), updatedat (date-time)

Retrieve a short code

GET /short_codes/{id}

short_code = client.short_codes.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")

puts(short_code)

Returns: countrycode (string), createdat (date-time), id (uuid), messagingprofileid (string | null), recordtype (enum: shortcode), shortcode (string), tags (array), updatedat (date-time)

Update short code

Update the settings for a specific short code. To unbind a short code from a profile, set the messagingprofileid to null or an empty string. To add or update tags, include the tags field as an array of strings.

PATCH /shortcodes/{id} — Required: messagingprofile_id

Optional: tags (array)

short_code = client.short_codes.update(
  "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  messaging_profile_id: "abc85f64-5717-4562-b3fc-2c9600000000"
)

puts(short_code)

Returns: countrycode (string), createdat (date-time), id (uuid), messagingprofileid (string | null), recordtype (enum: shortcode), shortcode (string), tags (array), updatedat (date-time)