Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Manage regulatory requirements, number bundles, supporting documents, and verified numbers for compliance. This skill provides Python SDK examples.
.claude/skills/team-telnyx-telnyx-numbers-compliance-python/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-21 | ✗→✓ | ▲ Improved | 402% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 472% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 175% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 48% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 261% | 0% |
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
bashpip install telnyx
pythonimport os from telnyx import Telnyx client = Telnyx( api_key=os.environ.get("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:
pythonimport telnyx try: result = client.messages.send(to="+13125550001", from_="+13125550002", text="Hello") except telnyx.APIConnectionError: print("Network error — check connectivity and retry") except telnyx.RateLimitError: # 429: rate limited — wait and retry with exponential backoff import time time.sleep(1) # Check Retry-After header for actual delay except telnyx.APIStatusError as e: print(f"API error {e.status_code}: {e.message}") if e.status_code == 422: print("Validation error — check required fields and formats")
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).
+13125550001). Include the + prefix and country code. No spaces, dashes, or parentheses.for item in page_result: to iterate through all pages automatically.Get all allowed bundles.
GET /bundle_pricing/billing_bundles
pythonpage = client.bundle_pricing.billing_bundles.list() page = page.data[0] print(page.id)
Returns: cost_code (string), created_at (date), currency (string), id (uuid), is_public (boolean), mrc_price (float), name (string), slug (string), specs (arraystring])
Get a single bundle by ID.
GET /bundle_pricing/billing_bundles/{bundle_id}
pythonbilling_bundle = client.bundle_pricing.billing_bundles.retrieve( bundle_id="8661948c-a386-4385-837f-af00f40f111a", ) print(billing_bundle.data)
Returns: active (boolean), bundle_limits (arrayobject]), cost_code (string), created_at (date), id (uuid), is_public (boolean), name (string), slug (string)
Get a paginated list of user bundles.
GET /bundle_pricing/user_bundles
pythonpage = client.bundle_pricing.user_bundles.list() page = page.data[0] print(page.id)
Returns: active (boolean), billing_bundle (object), created_at (date), id (uuid), resources (arrayobject]), updated_at (date), user_id (uuid)
Creates multiple user bundles for the user.
POST /bundle_pricing/user_bundles/bulk
Optional: idempotency_key (uuid), items (arrayobject])
pythonuser_bundle = client.bundle_pricing.user_bundles.create() print(user_bundle.data)
Returns: active (boolean), billing_bundle (object), created_at (date), id (uuid), resources (arrayobject]), updated_at (date), user_id (uuid)
Returns all user bundles that aren't in use.
GET /bundle_pricing/user_bundles/unused
pythonresponse = client.bundle_pricing.user_bundles.list_unused() print(response.data)
Returns: billing_bundle (object), user_bundle_ids (arraystring])
Retrieves a user bundle by its ID.
GET /bundle_pricing/user_bundles/{user_bundle_id}
pythonuser_bundle = client.bundle_pricing.user_bundles.retrieve( user_bundle_id="ca1d2263-d1f1-43ac-ba53-248e7a4bb26a", ) print(user_bundle.data)
Returns: active (boolean), billing_bundle (object), created_at (date), id (uuid), resources (arrayobject]), updated_at (date), user_id (uuid)
Deactivates a user bundle by its ID.
DELETE /bundle_pricing/user_bundles/{user_bundle_id}
pythonresponse = client.bundle_pricing.user_bundles.deactivate( user_bundle_id="ca1d2263-d1f1-43ac-ba53-248e7a4bb26a", ) print(response.data)
Returns: active (boolean), billing_bundle (object), created_at (date), id (uuid), resources (arrayobject]), updated_at (date), user_id (uuid)
Retrieves the resources of a user bundle by its ID.
GET /bundle_pricing/user_bundles/{user_bundle_id}/resources
pythonresponse = client.bundle_pricing.user_bundles.list_resources( user_bundle_id="ca1d2263-d1f1-43ac-ba53-248e7a4bb26a", ) print(response.data)
Returns: created_at (date), id (uuid), resource (string), resource_type (string), updated_at (date)
List all documents links ordered by created_at descending.
GET /document_links
pythonpage = client.document_links.list() page = page.data[0] print(page.id)
Returns: created_at (string), document_id (uuid), id (uuid), linked_record_type (string), linked_resource_id (string), record_type (string), updated_at (string)
List all documents ordered by created_at descending.
GET /documents
pythonpage = client.documents.list() page = page.data[0] print(page.id)
Returns: av_scan_status (enum: scanned, infected, pending_scan, not_scanned), content_type (string), created_at (string), customer_reference (string), filename (string), id (uuid), record_type (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)
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)
pythonresponse = client.documents.upload_json( document={}, ) print(response.data)
Returns: av_scan_status (enum: scanned, infected, pending_scan, not_scanned), content_type (string), created_at (string), customer_reference (string), filename (string), id (uuid), record_type (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)
Retrieve a document.
GET /documents/{id}
pythondocument = client.documents.retrieve( "6a09cdc3-8948-47f0-aa62-74ac943d6c58", ) print(document.data)
Returns: av_scan_status (enum: scanned, infected, pending_scan, not_scanned), content_type (string), created_at (string), customer_reference (string), filename (string), id (uuid), record_type (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)
Update a document.
PATCH /documents/{id}
Optional: av_scan_status (enum: scanned, infected, pending_scan, not_scanned), content_type (string), created_at (string), customer_reference (string), filename (string), id (uuid), record_type (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)
pythondocument = client.documents.update( document_id="6a09cdc3-8948-47f0-aa62-74ac943d6c58", ) print(document.data)
Returns: av_scan_status (enum: scanned, infected, pending_scan, not_scanned), content_type (string), created_at (string), customer_reference (string), filename (string), id (uuid), record_type (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)
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}
pythondocument = client.documents.delete( "6a09cdc3-8948-47f0-aa62-74ac943d6c58", ) print(document.data)
Returns: av_scan_status (enum: scanned, infected, pending_scan, not_scanned), content_type (string), created_at (string), customer_reference (string), filename (string), id (uuid), record_type (string), sha256 (string), size (object), status (enum: pending, verified, denied), updated_at (string)
Download a document.
GET /documents/{id}/download
pythonresponse = client.documents.download( "6a09cdc3-8948-47f0-aa62-74ac943d6c58", ) print(response) content = response.read() print(content)
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
pythonresponse = client.documents.generate_download_link( "550e8400-e29b-41d4-a716-446655440000", ) print(response.data)
Returns: url (uri)
POST /number_order_phone_numbers/{id}/requirement_group — Required: requirement_group_id
pythonresponse = client.number_order_phone_numbers.update_requirement_group( id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", requirement_group_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(response.data)
Returns: bundle_id (uuid), country_code (string), deadline (date-time), id (uuid), is_block_number (boolean), locality (string), order_request_id (uuid), phone_number (string), phone_number_type (string), record_type (string), regulatory_requirements (arrayobject]), requirements_met (boolean), requirements_status (string), status (string), sub_number_order_id (uuid)
GET /phone_numbers_regulatory_requirements
pythonphone_numbers_regulatory_requirement = client.phone_numbers_regulatory_requirements.retrieve() print(phone_numbers_regulatory_requirement.data)
Returns: phone_number (string), phone_number_type (string), record_type (string), region_information (arrayobject]), regulatory_requirements (arrayobject])
GET /regulatory_requirements
pythonregulatory_requirement = client.regulatory_requirements.retrieve() print(regulatory_requirement.data)
Returns: action (string), country_code (string), phone_number_type (string), regulatory_requirements (arrayobject])
GET /requirement_groups
pythonrequirement_groups = client.requirement_groups.list() print(requirement_groups)
POST /requirement_groups — Required: country_code, phone_number_type, action
Optional: customer_reference (string), regulatory_requirements (arrayobject])
pythonrequirement_group = client.requirement_groups.create( action="ordering", country_code="US", phone_number_type="local", ) print(requirement_group.id)
Returns: action (string), country_code (string), created_at (date-time), customer_reference (string), id (string), phone_number_type (string), record_type (string), regulatory_requirements (arrayobject]), status (enum: approved, unapproved, pending-approval, declined, expired), updated_at (date-time)
GET /requirement_groups/{id}
pythonrequirement_group = client.requirement_groups.retrieve( "id", ) print(requirement_group.id)
Returns: action (string), country_code (string), created_at (date-time), customer_reference (string), id (string), phone_number_type (string), record_type (string), regulatory_requirements (arrayobject]), status (enum: approved, unapproved, pending-approval, declined, expired), updated_at (date-time)
PATCH /requirement_groups/{id}
Optional: customer_reference (string), regulatory_requirements (arrayobject])
pythonrequirement_group = client.requirement_groups.update( id="550e8400-e29b-41d4-a716-446655440000", ) print(requirement_group.id)
Returns: action (string), country_code (string), created_at (date-time), customer_reference (string), id (string), phone_number_type (string), record_type (string), regulatory_requirements (arrayobject]), status (enum: approved, unapproved, pending-approval, declined, expired), updated_at (date-time)
DELETE /requirement_groups/{id}
pythonrequirement_group = client.requirement_groups.delete( "id", ) print(requirement_group.id)
Returns: action (string), country_code (string), created_at (date-time), customer_reference (string), id (string), phone_number_type (string), record_type (string), regulatory_requirements (arrayobject]), status (enum: approved, unapproved, pending-approval, declined, expired), updated_at (date-time)
POST /requirement_groups/{id}/submit_for_approval
pythonrequirement_group = client.requirement_groups.submit_for_approval( "id", ) print(requirement_group.id)
Returns: action (string), country_code (string), created_at (date-time), customer_reference (string), id (string), phone_number_type (string), record_type (string), regulatory_requirements (arrayobject]), status (enum: approved, unapproved, pending-approval, declined, expired), updated_at (date-time)
List all requirement types ordered by created_at descending
GET /requirement_types
pythonrequirement_types = client.requirement_types.list() print(requirement_types.data)
Returns: acceptance_criteria (object), created_at (string), description (string), example (string), id (uuid), name (string), record_type (string), type (enum: document, address, textual), updated_at (string)
Retrieve a requirement type by id
GET /requirement_types/{id}
pythonrequirement_type = client.requirement_types.retrieve( "a38c217a-8019-48f8-bff6-0fdd9939075b", ) print(requirement_type.data)
Returns: acceptance_criteria (object), created_at (string), description (string), example (string), id (uuid), name (string), record_type (string), type (enum: document, address, textual), updated_at (string)
List all requirements with filtering, sorting, and pagination
GET /requirements
pythonpage = client.requirements.list() page = page.data[0] print(page.id)
Returns: action (enum: both, branded_calling, ordering, porting), country_code (string), created_at (string), id (uuid), locality (string), phone_number_type (enum: local, national, toll_free), record_type (string), requirements_types (arrayobject]), updated_at (string)
Retrieve a document requirement record
GET /requirements/{id}
pythonrequirement = client.requirements.retrieve( "a9dad8d5-fdbd-49d7-aa23-39bb08a5ebaa", ) print(requirement.data)
Returns: action (enum: both, branded_calling, ordering, porting), country_code (string), created_at (string), id (uuid), locality (string), phone_number_type (enum: local, national, toll_free), record_type (string), requirements_types (arrayobject]), updated_at (string)
POST /sub_number_orders/{id}/requirement_group — Required: requirement_group_id
pythonresponse = client.sub_number_orders.update_requirement_group( id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", requirement_group_id="a4b201f9-8646-4e54-a7d2-b2e403eeaf8c", ) print(response.data)
Returns: country_code (string), created_at (date-time), customer_reference (string), id (uuid), is_block_sub_number_order (boolean), order_request_id (uuid), phone_number_type (string), phone_numbers (arrayobject]), phone_numbers_count (integer), record_type (string), regulatory_requirements (arrayobject]), requirements_met (boolean), status (string), updated_at (date-time)
Returns a list of your user addresses.
GET /user_addresses
pythonpage = client.user_addresses.list() page = page.data[0] print(page.id)
Returns: administrative_area (string), borough (string), business_name (string), country_code (string), created_at (string), customer_reference (string), extended_address (string), first_name (string), id (uuid), last_name (string), locality (string), neighborhood (string), phone_number (string), postal_code (string), record_type (string), street_address (string), updated_at (string)
Creates a user address.
POST /user_addresses — Required: first_name, last_name, business_name, street_address, locality, country_code
Optional: administrative_area (string), borough (string), customer_reference (string), extended_address (string), neighborhood (string), phone_number (string), postal_code (string), skip_address_verification (boolean)
pythonuser_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", ) print(user_address.data)
Returns: administrative_area (string), borough (string), business_name (string), country_code (string), created_at (string), customer_reference (string), extended_address (string), first_name (string), id (uuid), last_name (string), locality (string), neighborhood (string), phone_number (string), postal_code (string), record_type (string), street_address (string), updated_at (string)
Retrieves the details of an existing user address.
GET /user_addresses/{id}
pythonuser_address = client.user_addresses.retrieve( "id", ) print(user_address.data)
Returns: administrative_area (string), borough (string), business_name (string), country_code (string), created_at (string), customer_reference (string), extended_address (string), first_name (string), id (uuid), last_name (string), locality (string), neighborhood (string), phone_number (string), postal_code (string), record_type (string), street_address (string), updated_at (string)
Gets a paginated list of Verified Numbers.
GET /verified_numbers
pythonpage = client.verified_numbers.list() page = page.data[0] print(page.phone_number)
Returns: phone_number (string), record_type (enum: verified_number), verified_at (string)
Initiates phone number verification procedure. Supports DTMF extension dialing for voice calls to numbers behind IVR systems.
POST /verified_numbers — Required: phone_number, verification_method
Optional: extension (string)
pythonverified_number = client.verified_numbers.create( phone_number="+15551234567", verification_method="sms", ) print(verified_number.phone_number)
Returns: phone_number (string), verification_method (string)
GET /verified_numbers/{phone_number}
pythonverified_number_data_wrapper = client.verified_numbers.retrieve( "+15551234567", ) print(verified_number_data_wrapper.data)
Returns: phone_number (string), record_type (enum: verified_number), verified_at (string)
DELETE /verified_numbers/{phone_number}
pythonverified_number_data_wrapper = client.verified_numbers.delete( "+15551234567", ) print(verified_number_data_wrapper.data)
Returns: phone_number (string), record_type (enum: verified_number), verified_at (string)
POST /verified_numbers/{phone_number}/actions/verify — Required: verification_code
pythonverified_number_data_wrapper = client.verified_numbers.actions.submit_verification_code( phone_number="+15551234567", verification_code="123456", ) print(verified_number_data_wrapper.data)
Returns: phone_number (string), record_type (enum: verified_number), verified_at (string)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-21 | fail→pass | 7,439 | 3,779 | -49% | 1 | 1 | 0% | 1,443 | 7,250 | +402% | 0 | 0 | — |
case-01 | fail→pass | 6,147 | 4,271 | -31% | 1 | 1 | 0% | 1,286 | 7,354 | +472% | 0 | 0 | — |
case-02 | fail→pass | 14,336 | 7,615 | -47% | 1 | 1 | 0% | 2,944 | 8,099 | +175% | 0 | 0 | — |
case-03 | fail→pass | 25,904 | 3,745 | -86% | 1 | 1 | 0% | 4,931 | 7,300 | +48% | 0 | 0 | — |
case-04 | pass→pass | 8,832 | 7,485 | -15% | 1 | 1 | 0% | 1,848 | 7,993 | +333% | 0 | 0 | — |
case-05 | pass→pass | 6,063 | 3,603 | -41% | 1 | 1 | 0% | 1,244 | 7,128 | +473% | 0 | 0 | — |
case-06 | pass→pass | 14,552 | 12,670 | -13% | 1 | 1 | 0% | 2,959 | 9,103 | +208% | 0 | 0 | — |
case-07 | fail→pass | 10,843 | 4,560 | -58% | 1 | 1 | 0% | 2,031 | 7,339 | +261% | 0 | 0 | — |
case-08 | fail→pass | 5,746 | 2,826 | -51% | 1 | 1 | 0% | 1,125 | 7,089 | +530% | 0 | 0 | — |
case-09 | fail→pass | 7,999 | 2,850 | -64% | 1 | 1 | 0% | 1,459 | 7,020 | +381% | 0 | 0 | — |
case-10 | fail→pass | 10,182 | 19,194 | +89% | 1 | 1 | 0% | 1,806 | 6,965 | +286% | 0 | 0 | — |
case-11 | fail→pass | 24,604 | 3,217 | -87% | 1 | 1 | 0% | 2,504 | 7,100 | +184% | 0 | 0 | — |
case-12 | fail→pass | 9,742 | 3,262 | -67% | 1 | 1 | 0% | 1,887 | 7,169 | +280% | 0 | 0 | — |
case-13 | fail→pass | 11,860 | 2,996 | -75% | 1 | 1 | 0% | 2,128 | 7,091 | +233% | 0 | 0 | — |
case-14 | pass→pass | 8,195 | 2,725 | -67% | 1 | 1 | 0% | 1,493 | 6,925 | +364% | 0 | 0 | — |
case-15 | fail→pass | 7,120 | 4,176 | -41% | 1 | 1 | 0% | 1,398 | 7,299 | +422% | 0 | 0 | — |
case-16 | fail→pass | 10,599 | 4,643 | -56% | 1 | 1 | 0% | 1,981 | 7,316 | +269% | 0 | 0 | — |
case-17 | fail→pass | 10,786 | 3,482 | -68% | 1 | 1 | 0% | 2,027 | 7,120 | +251% | 0 | 0 | — |
case-18 | fail→pass | 5,915 | 2,547 | -57% | 1 | 1 | 0% | 1,124 | 6,946 | +518% | 0 | 0 | — |
case-19 | fail→pass | 11,260 | 22,194 | +97% | 1 | 1 | 0% | 2,110 | 7,118 | +237% | 0 | 0 | — |
case-20 | fail→pass | 8,985 | 3,299 | -63% | 1 | 1 | 0% | 1,957 | 7,156 | +266% | 0 | 0 | — |
case-22 | fail→pass | 12,521 | 3,319 | -73% | 1 | 1 | 0% | 2,362 | 7,100 | +201% | 0 | 0 | — |
case-23 | fail→pass | 8,553 | 3,109 | -64% | 1 | 1 | 0% | 1,725 | 7,135 | +314% | 0 | 0 | — |
case-24 | fail→pass | 10,107 | 2,808 | -72% | 1 | 1 | 0% | 2,033 | 7,095 | +249% | 0 | 0 | — |
case-25 | fail→pass | 5,986 | 3,162 | -47% | 1 | 1 | 0% | 1,160 | 7,077 | +510% | 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. 25 cases were attempted. The headline lift of +84 percentage points is the difference between those two pass rates over the 25 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.