api/ruby/telnyx-numbers-ruby/SKILL.md
Search for available phone numbers by location and features, check coverage, and place orders. Use when acquiring new phone numbers. This skill provides Ruby SDK examples.
npx skillsauth add team-telnyx/telnyx-toolkit telnyx-numbers-rubyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.
GET /country_coverage
country_coverage = client.country_coverage.retrieve
puts(country_coverage)
GET /country_coverage/countries/{country_code}
response = client.country_coverage.retrieve_country("US")
puts(response)
Creates an inventory coverage request.
GET /inventory_coverage
inventory_coverages = client.inventory_coverage.list
puts(inventory_coverages)
Gets a paginated list of phone number reservations.
GET /number_reservations
page = client.number_reservations.list
puts(page)
Creates a Phone Number Reservation for multiple numbers.
POST /number_reservations
number_reservation = client.number_reservations.create
puts(number_reservation)
Gets a single phone number reservation.
GET /number_reservations/{number_reservation_id}
number_reservation = client.number_reservations.retrieve("number_reservation_id")
puts(number_reservation)
Extends reservation expiry time on all phone numbers.
POST /number_reservations/{number_reservation_id}/actions/extend
response = client.number_reservations.actions.extend_("number_reservation_id")
puts(response)
Get a paginated list of number orders.
GET /number_orders
page = client.number_orders.list
puts(page)
Creates a phone number order.
POST /number_orders
number_order = client.number_orders.create
puts(number_order)
Get an existing phone number order.
GET /number_orders/{number_order_id}
number_order = client.number_orders.retrieve("number_order_id")
puts(number_order)
Updates a phone number order.
PATCH /number_orders/{number_order_id}
number_order = client.number_orders.update("number_order_id")
puts(number_order)
Get a paginated list of number block orders.
GET /number_block_orders
page = client.number_block_orders.list
puts(page)
Creates a phone number block order.
POST /number_block_orders — Required: starting_number, range
number_block_order = client.number_block_orders.create(range: 10, starting_number: "+19705555000")
puts(number_block_order)
Get an existing phone number block order.
GET /number_block_orders/{number_block_order_id}
number_block_order = client.number_block_orders.retrieve("number_block_order_id")
puts(number_block_order)
Get a list of phone numbers associated to orders.
GET /number_order_phone_numbers
number_order_phone_numbers = client.number_order_phone_numbers.list
puts(number_order_phone_numbers)
POST /number_order_phone_numbers/{id}/requirement_group — Required: requirement_group_id
response = client.number_order_phone_numbers.update_requirement_group(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
requirement_group_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
)
puts(response)
Get an existing phone number in number order.
GET /number_order_phone_numbers/{number_order_phone_number_id}
number_order_phone_number = client.number_order_phone_numbers.retrieve("number_order_phone_number_id")
puts(number_order_phone_number)
Updates requirements for a single phone number within a number order.
PATCH /number_order_phone_numbers/{number_order_phone_number_id}
response = client.number_order_phone_numbers.update_requirements("number_order_phone_number_id")
puts(response)
Get a paginated list of sub number orders.
GET /sub_number_orders
sub_number_orders = client.sub_number_orders.list
puts(sub_number_orders)
POST /sub_number_orders/{id}/requirement_group — Required: requirement_group_id
response = client.sub_number_orders.update_requirement_group(
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
requirement_group_id: "a4b201f9-8646-4e54-a7d2-b2e403eeaf8c"
)
puts(response)
Get an existing sub number order.
GET /sub_number_orders/{sub_number_order_id}
sub_number_order = client.sub_number_orders.retrieve("sub_number_order_id")
puts(sub_number_order)
Updates a sub number order.
PATCH /sub_number_orders/{sub_number_order_id}
sub_number_order = client.sub_number_orders.update("sub_number_order_id")
puts(sub_number_order)
Allows you to cancel a sub number order in 'pending' status.
PATCH /sub_number_orders/{sub_number_order_id}/cancel
response = client.sub_number_orders.cancel("sub_number_order_id")
puts(response)
Create a CSV report for sub number orders.
POST /sub_number_orders/report
sub_number_orders_report = client.sub_number_orders_report.create
puts(sub_number_orders_report)
Get the status and details of a sub number orders report.
GET /sub_number_orders/report/{report_id}
sub_number_orders_report = client.sub_number_orders_report.retrieve("12ade33a-21c0-473b-b055-b3c836e1c293")
puts(sub_number_orders_report)
Download the CSV file for a completed sub number orders report.
GET /sub_number_orders/report/{report_id}/download
response = client.sub_number_orders_report.download("12ade33a-21c0-473b-b055-b3c836e1c293")
puts(response)
GET /advanced_orders
advanced_orders = client.advanced_orders.list
puts(advanced_orders)
POST /advanced_orders
advanced_order = client.advanced_orders.create
puts(advanced_order)
PATCH /advanced_orders/{advanced-order-id}/requirement_group
response = client.advanced_orders.update_requirement_group("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(response)
GET /advanced_orders/{order_id}
advanced_order = client.advanced_orders.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(advanced_order)
Get a paginated list of inexplicit number orders.
GET /inexplicit_number_orders
page = client.inexplicit_number_orders.list
puts(page)
Create an inexplicit number order to programmatically purchase phone numbers without specifying exact numbers.
POST /inexplicit_number_orders — Required: ordering_groups
inexplicit_number_order = client.inexplicit_number_orders.create(
ordering_groups: [{count_requested: "count_requested", country_iso: :US, phone_number_type: "phone_number_type"}]
)
puts(inexplicit_number_order)
Get an existing inexplicit number order by ID.
GET /inexplicit_number_orders/{id}
inexplicit_number_order = client.inexplicit_number_orders.retrieve("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
puts(inexplicit_number_order)
GET /comments
comments = client.comments.list
puts(comments)
POST /comments
comment = client.comments.create
puts(comment)
GET /comments/{id}
comment = client.comments.retrieve("id")
puts(comment)
PATCH /comments/{id}/read
response = client.comments.mark_as_read("id")
puts(response)
GET /available_phone_number_blocks
available_phone_number_blocks = client.available_phone_number_blocks.list
puts(available_phone_number_blocks)
GET /available_phone_numbers
available_phone_numbers = client.available_phone_numbers.list
puts(available_phone_numbers)
POST /numbers_features — Required: phone_numbers
numbers_feature = client.numbers_features.create(phone_numbers: ["string"])
puts(numbers_feature)
The following webhook events are sent to your configured webhook URL.
All webhooks include telnyx-timestamp and telnyx-signature-ed25519 headers for verification (Standard Webhooks compatible).
| Event | Description |
|-------|-------------|
| numberOrderStatusUpdate | Number Order Status Update |
tools
Build cross-platform VoIP calling apps with React Native using Telnyx Voice SDK. High-level reactive API with automatic lifecycle management, CallKit/ConnectionService integration, and push notifications. Use for mobile VoIP apps with minimal setup.
tools
Build browser-based VoIP calling apps using Telnyx WebRTC JavaScript SDK. Covers authentication, voice calls, events, debugging, call quality metrics, and AI Agent integration. Use for web-based real-time communication.
tools
Build VoIP calling apps on iOS using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, CallKit integration, PushKit/APNS push notifications, call quality metrics, and AI Agent integration. Use when implementing real-time voice communication on iOS.
tools
Build cross-platform VoIP calling apps with Flutter using Telnyx WebRTC SDK. Covers authentication, making/receiving calls, push notifications (FCM + APNS), call quality metrics, and AI Agent integration. Works on Android, iOS, and Web.