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 REST API (curl) examples.
.claude/skills/team-telnyx-telnyx-numbers-compliance-curl/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 661% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 395% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 318% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 570% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 616% | 0% |
<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->
text# curl is pre-installed on macOS, Linux, and Windows 10+
bashexport TELNYX_API_KEY="YOUR_API_KEY_HERE"
All examples below use $TELNYX_API_KEY for authentication.
All API calls can fail with network errors, rate limits (429), validation errors (422), or authentication errors (401). Always handle errors in production code:
bash# Check HTTP status code in response response=$(curl -s -w "\n%{http_code}" \ -X POST "https://api.telnyx.com/v2/messages" \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"to": "+13125550001", "from": "+13125550002", "text": "Hello"}') http_code=$(echo "$response" | tail -1) body=$(echo "$response" | sed '$d') case $http_code in 2*) echo "Success: $body" ;; 422) echo "Validation error — check required fields and formats" ;; 429) echo "Rate limited — retry after delay"; sleep 1 ;; 401) echo "Authentication failed — check TELNYX_API_KEY" ;; *) echo "Error $http_code: $body" ;; esac
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.page[number] and page[size] query parameters to navigate pages. Check meta.total_pages in the response.Get all allowed bundles.
GET /bundle_pricing/billing_bundles
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/bundle_pricing/billing_bundles"
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}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/bundle_pricing/billing_bundles/8661948c-a386-4385-837f-af00f40f111a"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/bundle_pricing/user_bundles"
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])
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/bundle_pricing/user_bundles/bulk"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/bundle_pricing/user_bundles/unused"
Returns: billing_bundle (object), user_bundle_ids (arraystring])
Retrieves a user bundle by its ID.
GET /bundle_pricing/user_bundles/{user_bundle_id}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/bundle_pricing/user_bundles/ca1d2263-d1f1-43ac-ba53-248e7a4bb26a"
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}
bashcurl \ -X DELETE \ -H "Authorization: Bearer $TELNYX_API_KEY" \ "https://api.telnyx.com/v2/bundle_pricing/user_bundles/ca1d2263-d1f1-43ac-ba53-248e7a4bb26a"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/bundle_pricing/user_bundles/ca1d2263-d1f1-43ac-ba53-248e7a4bb26a/resources"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/document_links"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/documents?filter={'filename': {'contains': 'invoice'}, 'customer_reference': {'in': ['REF001', 'REF002']}, 'created_at': {'gt': '2021-01-01T00:00:00Z'}}&sort=['filename']"
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)
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -F "file=@/path/to/file" \ -F "customer_reference=MY REF 001" \ "https://api.telnyx.com/v2/documents"
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}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/documents/6a09cdc3-8948-47f0-aa62-74ac943d6c58"
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)
bashcurl \ -X PATCH \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/documents/6a09cdc3-8948-47f0-aa62-74ac943d6c58"
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}
bashcurl \ -X DELETE \ -H "Authorization: Bearer $TELNYX_API_KEY" \ "https://api.telnyx.com/v2/documents/6a09cdc3-8948-47f0-aa62-74ac943d6c58"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/documents/6a09cdc3-8948-47f0-aa62-74ac943d6c58/download"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/documents/550e8400-e29b-41d4-a716-446655440000/download_link"
Returns: url (uri)
POST /number_order_phone_numbers/{id}/requirement_group — Required: requirement_group_id
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "requirement_group_id": "550e8400-e29b-41d4-a716-446655440000" }' \ "https://api.telnyx.com/v2/number_order_phone_numbers/550e8400-e29b-41d4-a716-446655440000/requirement_group"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/phone_numbers_regulatory_requirements"
Returns: phone_number (string), phone_number_type (string), record_type (string), region_information (arrayobject]), regulatory_requirements (arrayobject])
GET /regulatory_requirements
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/regulatory_requirements"
Returns: action (string), country_code (string), phone_number_type (string), regulatory_requirements (arrayobject])
GET /requirement_groups
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/requirement_groups"
POST /requirement_groups — Required: country_code, phone_number_type, action
Optional: customer_reference (string), regulatory_requirements (arrayobject])
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "country_code": "US", "phone_number_type": "local", "action": "ordering" }' \ "https://api.telnyx.com/v2/requirement_groups"
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}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/requirement_groups/550e8400-e29b-41d4-a716-446655440000"
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])
bashcurl \ -X PATCH \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/requirement_groups/550e8400-e29b-41d4-a716-446655440000"
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}
bashcurl \ -X DELETE \ -H "Authorization: Bearer $TELNYX_API_KEY" \ "https://api.telnyx.com/v2/requirement_groups/550e8400-e29b-41d4-a716-446655440000"
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
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/requirement_groups/550e8400-e29b-41d4-a716-446655440000/submit_for_approval"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/requirement_types?sort=['name']"
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}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/requirement_types/a38c217a-8019-48f8-bff6-0fdd9939075b"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/requirements?sort=['country_code']"
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}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/requirements/a9dad8d5-fdbd-49d7-aa23-39bb08a5ebaa"
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
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "requirement_group_id": "a4b201f9-8646-4e54-a7d2-b2e403eeaf8c" }' \ "https://api.telnyx.com/v2/sub_number_orders/550e8400-e29b-41d4-a716-446655440000/requirement_group"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/user_addresses?sort=street_address"
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)
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "first_name": "Alfred", "last_name": "Foster", "business_name": "Toy-O'Kon", "street_address": "600 Congress Avenue", "locality": "Austin", "country_code": "US" }' \ "https://api.telnyx.com/v2/user_addresses"
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}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/user_addresses/550e8400-e29b-41d4-a716-446655440000"
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
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/verified_numbers"
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)
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "phone_number": "+15551234567", "verification_method": "sms" }' \ "https://api.telnyx.com/v2/verified_numbers"
Returns: phone_number (string), verification_method (string)
GET /verified_numbers/{phone_number}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/verified_numbers/+15551234567"
Returns: phone_number (string), record_type (enum: verified_number), verified_at (string)
DELETE /verified_numbers/{phone_number}
bashcurl \ -X DELETE \ -H "Authorization: Bearer $TELNYX_API_KEY" \ "https://api.telnyx.com/v2/verified_numbers/+15551234567"
Returns: phone_number (string), record_type (enum: verified_number), verified_at (string)
POST /verified_numbers/{phone_number}/actions/verify — Required: verification_code
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "verification_code": "123456" }' \ "https://api.telnyx.com/v2/verified_numbers/+15551234567/actions/verify"
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-01 | fail→pass | 13,732 | 3,187 | -77% | 1 | 1 | 0% | 1,077 | 8,195 | +661% | 0 | 0 | — |
case-02 | fail→pass | 7,939 | 4,318 | -46% | 1 | 1 | 0% | 1,715 | 8,486 | +395% | 0 | 0 | — |
case-03 | pass→pass | 3,943 | 3,541 | -10% | 1 | 1 | 0% | 865 | 8,297 | +859% | 0 | 0 | — |
case-04 | pass→pass | 7,564 | 7,396 | -2% | 1 | 1 | 0% | 1,531 | 8,985 | +487% | 0 | 0 | — |
case-05 | pass→pass | 5,737 | 5,932 | +3% | 1 | 1 | 0% | 1,120 | 8,675 | +675% | 0 | 0 | — |
case-06 | fail→pass | 9,893 | 1,994 | -80% | 1 | 1 | 0% | 1,873 | 7,832 | +318% | 0 | 0 | — |
case-07 | fail→pass | 6,381 | 3,461 | -46% | 1 | 1 | 0% | 1,237 | 8,289 | +570% | 0 | 0 | — |
case-08 | fail→pass | 6,557 | 3,386 | -48% | 1 | 1 | 0% | 1,139 | 8,155 | +616% | 0 | 0 | — |
case-09 | fail→pass | 8,277 | 2,179 | -74% | 1 | 1 | 0% | 1,398 | 7,897 | +465% | 0 | 0 | — |
case-10 | fail→pass | 10,233 | 2,252 | -78% | 1 | 1 | 0% | 1,629 | 7,934 | +387% | 0 | 0 | — |
case-11 | fail→pass | 8,499 | 2,311 | -73% | 1 | 1 | 0% | 1,732 | 7,949 | +359% | 0 | 0 | — |
case-12 | fail→pass | 8,020 | 2,796 | -65% | 1 | 1 | 0% | 1,353 | 8,044 | +495% | 0 | 0 | — |
case-13 | pass→pass | 4,504 | 3,203 | -29% | 1 | 1 | 0% | 885 | 8,098 | +815% | 0 | 0 | — |
case-14 | fail→pass | 9,713 | 3,663 | -62% | 1 | 1 | 0% | 1,891 | 8,219 | +335% | 0 | 0 | — |
case-15 | fail→pass | 11,683 | 2,768 | -76% | 1 | 1 | 0% | 2,325 | 8,059 | +247% | 0 | 0 | — |
case-16 | fail→pass | 4,470 | 3,120 | -30% | 1 | 1 | 0% | 974 | 8,215 | +743% | 0 | 0 | — |
case-17 | fail→pass | 14,115 | 2,545 | -82% | 1 | 1 | 0% | 1,611 | 7,937 | +393% | 0 | 0 | — |
case-18 | fail→pass | 6,404 | 2,650 | -59% | 1 | 1 | 0% | 1,102 | 8,013 | +627% | 0 | 0 | — |
case-19 | fail→pass | 11,878 | 3,032 | -74% | 1 | 1 | 0% | 2,438 | 8,184 | +236% | 0 | 0 | — |
case-20 | fail→pass | 6,677 | 2,997 | -55% | 1 | 1 | 0% | 1,229 | 8,130 | +562% | 0 | 0 | — |
case-21 | fail→pass | 6,373 | 2,197 | -66% | 1 | 1 | 0% | 1,084 | 7,891 | +628% | 0 | 0 | — |
case-22 | fail→pass | 6,741 | 2,320 | -66% | 1 | 1 | 0% | 1,121 | 7,894 | +604% | 0 | 0 | — |
case-23 | fail→pass | 8,706 | 3,299 | -62% | 1 | 1 | 0% | 1,572 | 8,205 | +422% | 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. 23 cases were attempted. The headline lift of +83 percentage points is the difference between those two pass rates over the 23 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.