team-telnyx/telnyx-skills

telnyx-numbers-compliance-ruby

>- Manage regulatory requirements, number bundles, supporting documents, and verified numbers for compliance. This skill provides Ruby SDK examples.

First seen Mar 7, 2026

Installation

$ npx skills add team-telnyx/telnyx-skills --skill telnyx-numbers-compliance-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
numbers-compliance
language
ruby
generated_by
telnyx-openapi-pipeline

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 20,052 B
  • docs SUMMARY.md 183 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 Numbers Compliance - 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

  • Phone numbers must be in E.164 format (e.g., +13125550001). Include the + prefix and country code. No spaces, dashes, or parentheses.
  • Pagination: Use .autopagingeach for automatic iteration: page.autopagingeach { |item| puts item.id }.

Retrieve Bundles

Get all allowed bundles.

GET /bundlepricing/billingbundles

page = client.bundle_pricing.billing_bundles.list

puts(page)

Returns: costcode (string), createdat (date), currency (string), id (uuid), ispublic (boolean), mrcprice (float), name (string), slug (string), specs (array[string])

Get Bundle By Id

Get a single bundle by ID.

GET /bundlepricing/billingbundles/{bundle_id}

billing_bundle = client.bundle_pricing.billing_bundles.retrieve("8661948c-a386-4385-837f-af00f40f111a")

puts(billing_bundle)

Returns: active (boolean), bundlelimits (array[object]), costcode (string), createdat (date), id (uuid), ispublic (boolean), name (string), slug (string)

Get User Bundles

Get a paginated list of user bundles.

GET /bundlepricing/userbundles

page = client.bundle_pricing.user_bundles.list

puts(page)

Returns: active (boolean), billingbundle (object), createdat (date), id (uuid), resources (array[object]), updatedat (date), userid (uuid)

Create User Bundles

Creates multiple user bundles for the user.

POST /bundlepricing/userbundles/bulk

Optional: idempotency_key (uuid), items (array[object])

user_bundle = client.bundle_pricing.user_bundles.create

puts(user_bundle)

Returns: active (boolean), billingbundle (object), createdat (date), id (uuid), resources (array[object]), updatedat (date), userid (uuid)

Get Unused User Bundles

Returns all user bundles that aren't in use.

GET /bundlepricing/userbundles/unused

response = client.bundle_pricing.user_bundles.list_unused

puts(response)

Returns: billingbundle (object), userbundle_ids (array[string])

Get User Bundle by Id

Retrieves a user bundle by its ID.

GET /bundlepricing/userbundles/{userbundleid}

user_bundle = client.bundle_pricing.user_bundles.retrieve("ca1d2263-d1f1-43ac-ba53-248e7a4bb26a")

puts(user_bundle)

Returns: active (boolean), billingbundle (object), createdat (date), id (uuid), resources (array[object]), updatedat (date), userid (uuid)

Deactivate User Bundle

Deactivates a user bundle by its ID.

DELETE /bundlepricing/userbundles/{userbundleid}

response = client.bundle_pricing.user_bundles.deactivate("ca1d2263-d1f1-43ac-ba53-248e7a4bb26a")

puts(response)

Returns: active (boolean), billingbundle (object), createdat (date), id (uuid), resources (array[object]), updatedat (date), userid (uuid)

Get User Bundle Resources

Retrieves the resources of a user bundle by its ID.

GET /bundlepricing/userbundles/{userbundleid}/resources

response = client.bundle_pricing.user_bundles.list_resources("ca1d2263-d1f1-43ac-ba53-248e7a4bb26a")

puts(response)

Returns: createdat (date), id (uuid), resource (string), resourcetype (string), updated_at (date)

List all document links

List all documents links ordered by created_at descending.

GET /document_links

page = client.document_links.list

puts(page)

Returns: createdat (string), documentid (uuid), id (uuid), linkedrecordtype (string), linkedresourceid (string), recordtype (string), updatedat (string)

List all documents

List all documents ordered by created_at descending.

GET /documents

page = client.documents.list

puts(page)

Returns: avscanstatus (enum: scanned, infected, pendingscan, notscanned), contenttype (string), createdat (string), customerreference (string), filename (string), id (uuid), recordtype (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)

Upload a document

Upload a document. Uploaded files must be linked to a service within 30 minutes or they will be automatically deleted.

POST /documents

Optional: customer_reference (string), file (byte), filename (string), url (string)

response = client.documents.upload_json(document: {})

puts(response)

Returns: avscanstatus (enum: scanned, infected, pendingscan, notscanned), contenttype (string), createdat (string), customerreference (string), filename (string), id (uuid), recordtype (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)

Retrieve a document

Retrieve a document.

GET /documents/{id}

document = client.documents.retrieve("6a09cdc3-8948-47f0-aa62-74ac943d6c58")

puts(document)

Returns: avscanstatus (enum: scanned, infected, pendingscan, notscanned), contenttype (string), createdat (string), customerreference (string), filename (string), id (uuid), recordtype (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)

Update a document

Update a document.

PATCH /documents/{id}

Optional: avscanstatus (enum: scanned, infected, pendingscan, notscanned), contenttype (string), createdat (string), customerreference (string), filename (string), id (uuid), recordtype (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)

document = client.documents.update("6a09cdc3-8948-47f0-aa62-74ac943d6c58")

puts(document)

Returns: avscanstatus (enum: scanned, infected, pendingscan, notscanned), contenttype (string), createdat (string), customerreference (string), filename (string), id (uuid), recordtype (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)

Delete a document

Delete a document. A document can only be deleted if it's not linked to a service. If it is linked to a service, it must be unlinked prior to deleting.

DELETE /documents/{id}

document = client.documents.delete("6a09cdc3-8948-47f0-aa62-74ac943d6c58")

puts(document)

Returns: avscanstatus (enum: scanned, infected, pendingscan, notscanned), contenttype (string), createdat (string), customerreference (string), filename (string), id (uuid), recordtype (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)

Download a document

Download a document.

GET /documents/{id}/download

response = client.documents.download("6a09cdc3-8948-47f0-aa62-74ac943d6c58")

puts(response)

Generate a temporary download link for a document

Generates a temporary pre-signed URL that can be used to download the document directly from the storage backend without authentication.

GET /documents/{id}/download_link

response = client.documents.generate_download_link("550e8400-e29b-41d4-a716-446655440000")

puts(response)

Returns: url (uri)

Update requirement group for a phone number order

POST /numberorderphonenumbers/{id}/requirementgroup — Required: requirementgroupid

response = client.number_order_phone_numbers.update_requirement_group(
  "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  requirement_group_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
)

puts(response)

Returns: bundleid (uuid), countrycode (string), deadline (date-time), id (uuid), isblocknumber (boolean), locality (string), orderrequestid (uuid), phonenumber (string), phonenumbertype (string), recordtype (string), regulatoryrequirements (array[object]), requirementsmet (boolean), requirementsstatus (string), status (string), subnumberorderid (uuid)

Retrieve regulatory requirements for a list of phone numbers

GET /phonenumbersregulatory_requirements

phone_numbers_regulatory_requirement = client.phone_numbers_regulatory_requirements.retrieve

puts(phone_numbers_regulatory_requirement)

Returns: phonenumber (string), phonenumbertype (string), recordtype (string), regioninformation (array[object]), regulatoryrequirements (array[object])

Retrieve regulatory requirements

GET /regulatory_requirements

regulatory_requirement = client.regulatory_requirements.retrieve

puts(regulatory_requirement)

Returns: action (string), countrycode (string), phonenumbertype (string), regulatoryrequirements (array[object])

List requirement groups

GET /requirement_groups

requirement_groups = client.requirement_groups.list

puts(requirement_groups)

Create a new requirement group

POST /requirementgroups — Required: countrycode, phonenumbertype, action

Optional: customerreference (string), regulatoryrequirements (array[object])

requirement_group = client.requirement_groups.create(action: :ordering, country_code: "US", phone_number_type: :local)

puts(requirement_group)

Returns: action (string), countrycode (string), createdat (date-time), customerreference (string), id (string), phonenumbertype (string), recordtype (string), regulatoryrequirements (array[object]), status (enum: approved, unapproved, pending-approval, declined, expired), updatedat (date-time)

Get a single requirement group by ID

GET /requirement_groups/{id}

requirement_group = client.requirement_groups.retrieve("550e8400-e29b-41d4-a716-446655440000")

puts(requirement_group)

Returns: action (string), countrycode (string), createdat (date-time), customerreference (string), id (string), phonenumbertype (string), recordtype (string), regulatoryrequirements (array[object]), status (enum: approved, unapproved, pending-approval, declined, expired), updatedat (date-time)

Update requirement values in requirement group

PATCH /requirement_groups/{id}

Optional: customerreference (string), regulatoryrequirements (array[object])

requirement_group = client.requirement_groups.update("550e8400-e29b-41d4-a716-446655440000")

puts(requirement_group)

Returns: action (string), countrycode (string), createdat (date-time), customerreference (string), id (string), phonenumbertype (string), recordtype (string), regulatoryrequirements (array[object]), status (enum: approved, unapproved, pending-approval, declined, expired), updatedat (date-time)

Delete a requirement group by ID

DELETE /requirement_groups/{id}

requirement_group = client.requirement_groups.delete("550e8400-e29b-41d4-a716-446655440000")

puts(requirement_group)

Returns: action (string), countrycode (string), createdat (date-time), customerreference (string), id (string), phonenumbertype (string), recordtype (string), regulatoryrequirements (array[object]), status (enum: approved, unapproved, pending-approval, declined, expired), updatedat (date-time)

Submit a Requirement Group for Approval

POST /requirementgroups/{id}/submitfor_approval

requirement_group = client.requirement_groups.submit_for_approval("550e8400-e29b-41d4-a716-446655440000")

puts(requirement_group)

Returns: action (string), countrycode (string), createdat (date-time), customerreference (string), id (string), phonenumbertype (string), recordtype (string), regulatoryrequirements (array[object]), status (enum: approved, unapproved, pending-approval, declined, expired), updatedat (date-time)

List all requirement types

List all requirement types ordered by created_at descending

GET /requirement_types

requirement_types = client.requirement_types.list

puts(requirement_types)

Returns: acceptancecriteria (object), createdat (string), description (string), example (string), id (uuid), name (string), recordtype (string), type (enum: document, address, textual), updatedat (string)

Retrieve a requirement types

Retrieve a requirement type by id

GET /requirement_types/{id}

requirement_type = client.requirement_types.retrieve("a38c217a-8019-48f8-bff6-0fdd9939075b")

puts(requirement_type)

Returns: acceptancecriteria (object), createdat (string), description (string), example (string), id (uuid), name (string), recordtype (string), type (enum: document, address, textual), updatedat (string)

List all requirements

List all requirements with filtering, sorting, and pagination

GET /requirements

page = client.requirements.list

puts(page)

Returns: action (enum: both, brandedcalling, ordering, porting), countrycode (string), createdat (string), id (uuid), locality (string), phonenumbertype (enum: local, national, tollfree), recordtype (string), requirementstypes (array[object]), updated_at (string)

Retrieve a document requirement

Retrieve a document requirement record

GET /requirements/{id}

requirement = client.requirements.retrieve("a9dad8d5-fdbd-49d7-aa23-39bb08a5ebaa")

puts(requirement)

Returns: action (enum: both, brandedcalling, ordering, porting), countrycode (string), createdat (string), id (uuid), locality (string), phonenumbertype (enum: local, national, tollfree), recordtype (string), requirementstypes (array[object]), updated_at (string)

Update requirement group for a sub number order

POST /subnumberorders/{id}/requirementgroup — Required: requirementgroup_id

response = client.sub_number_orders.update_requirement_group(
  "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  requirement_group_id: "a4b201f9-8646-4e54-a7d2-b2e403eeaf8c"
)

puts(response)

Returns: countrycode (string), createdat (date-time), customerreference (string), id (uuid), isblocksubnumberorder (boolean), orderrequestid (uuid), phonenumbertype (string), phonenumbers (array[object]), phonenumberscount (integer), recordtype (string), regulatoryrequirements (array[object]), requirementsmet (boolean), status (string), updatedat (date-time)

List all user addresses

Returns a list of your user addresses.

GET /user_addresses

page = client.user_addresses.list

puts(page)

Returns: administrativearea (string), borough (string), businessname (string), countrycode (string), createdat (string), customerreference (string), extendedaddress (string), firstname (string), id (uuid), lastname (string), locality (string), neighborhood (string), phonenumber (string), postalcode (string), recordtype (string), streetaddress (string), updated_at (string)

Creates a user address

Creates a user address.

POST /useraddresses — Required: firstname, lastname, businessname, streetaddress, locality, countrycode

Optional: administrativearea (string), borough (string), customerreference (string), extendedaddress (string), neighborhood (string), phonenumber (string), postalcode (string), skipaddress_verification (boolean)

user_address = client.user_addresses.create(
  business_name: "Toy-O'Kon",
  country_code: "US",
  first_name: "Alfred",
  last_name: "Foster",
  locality: "Austin",
  street_address: "600 Congress Avenue"
)

puts(user_address)

Returns: administrativearea (string), borough (string), businessname (string), countrycode (string), createdat (string), customerreference (string), extendedaddress (string), firstname (string), id (uuid), lastname (string), locality (string), neighborhood (string), phonenumber (string), postalcode (string), recordtype (string), streetaddress (string), updated_at (string)

Retrieve a user address

Retrieves the details of an existing user address.

GET /user_addresses/{id}

user_address = client.user_addresses.retrieve("550e8400-e29b-41d4-a716-446655440000")

puts(user_address)

Returns: administrativearea (string), borough (string), businessname (string), countrycode (string), createdat (string), customerreference (string), extendedaddress (string), firstname (string), id (uuid), lastname (string), locality (string), neighborhood (string), phonenumber (string), postalcode (string), recordtype (string), streetaddress (string), updated_at (string)

List all Verified Numbers

Gets a paginated list of Verified Numbers.

GET /verified_numbers

page = client.verified_numbers.list

puts(page)

Returns: phonenumber (string), recordtype (enum: verifiednumber), verifiedat (string)

Request phone number verification

Initiates phone number verification procedure. Supports DTMF extension dialing for voice calls to numbers behind IVR systems.

POST /verifiednumbers — Required: phonenumber, verification_method

Optional: extension (string)

verified_number = client.verified_numbers.create(phone_number: "+15551234567", verification_method: :sms)

puts(verified_number)

Returns: phonenumber (string), verificationmethod (string)

Retrieve a verified number

GET /verifiednumbers/{phonenumber}

verified_number_data_wrapper = client.verified_numbers.retrieve("+15551234567")

puts(verified_number_data_wrapper)

Returns: phonenumber (string), recordtype (enum: verifiednumber), verifiedat (string)

Delete a verified number

DELETE /verifiednumbers/{phonenumber}

verified_number_data_wrapper = client.verified_numbers.delete("+15551234567")

puts(verified_number_data_wrapper)

Returns: phonenumber (string), recordtype (enum: verifiednumber), verifiedat (string)

Submit verification code

POST /verifiednumbers/{phonenumber}/actions/verify — Required: verification_code

verified_number_data_wrapper = client.verified_numbers.actions.submit_verification_code("+15551234567", verification_code: "123456")

puts(verified_number_data_wrapper)

Returns: phonenumber (string), recordtype (enum: verifiednumber), verifiedat (string)