Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Manage account balance, payments, invoices, webhooks, and view audit logs and detail records. This skill provides REST API (curl) examples.
.claude/skills/team-telnyx-telnyx-account-curl/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 52% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 123% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 169% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 64% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 288% | 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).
page[number] and page[size] query parameters to navigate pages. Check meta.total_pages in the response.Retrieve a list of audit log entries. Audit logs are a best-effort, eventually consistent record of significant account-related changes.
GET /audit_events
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/audit_events?sort=desc"
Returns: alternate_resource_id (string | null), change_made_by (enum: telnyx, account_manager, account_owner, organization_member), change_type (string), changes (array | null), created_at (date-time), id (uuid), organization_id (uuid), record_type (string), resource_id (string), user_id (uuid)
GET /balance
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/balance"
Returns: available_credit (string), balance (string), credit_limit (string), currency (string), pending (string), record_type (enum: balance)
Retrieve a detailed breakdown of monthly charges for phone numbers in a specified date range. The date range cannot exceed 31 days.
GET /charges_breakdown
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/charges_breakdown?start_date=2025-05-01&end_date=2025-06-01&format=json"
Returns: currency (string), end_date (date), results (arrayobject]), start_date (date), user_email (email), user_id (string)
Retrieve a summary of monthly charges for a specified date range. The date range cannot exceed 31 days.
GET /charges_summary
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/charges_summary?start_date=2025-05-01&end_date=2025-06-01"
Returns: currency (string), end_date (date), start_date (date), summary (object), total (object), user_email (email), user_id (string)
Search for any detail record across the Telnyx Platform
GET /detail_records
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/detail_records"
Returns: carrier (string), carrier_fee (string), cld (string), cli (string), completed_at (date-time), cost (string), country_code (string), created_at (date-time), currency (string), delivery_status (string), delivery_status_failover_url (string), delivery_status_webhook_url (string), direction (enum: inbound, outbound), errors (arraystring]), fteu (boolean), mcc (string), message_type (enum: SMS, MMS, RCS), mnc (string), on_net (boolean), parts (integer), profile_id (string), profile_name (string), rate (string), record_type (string), sent_at (date-time), source_country_code (string), status (enum: gw_timeout, delivered, dlr_unconfirmed, dlr_timeout, received, gw_reject, failed), tags (string), updated_at (date-time), user_id (string), uuid (string)
Retrieve a paginated list of invoices.
GET /invoices
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/invoices?sort=period_start"
Returns: file_id (uuid), invoice_id (uuid), paid (boolean), period_end (date), period_start (date), url (uri)
Retrieve a single invoice by its unique identifier.
GET /invoices/{id}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/invoices/550e8400-e29b-41d4-a716-446655440000?action=json"
Returns: download_url (uri), file_id (uuid), invoice_id (uuid), paid (boolean), period_end (date), period_start (date), url (uri)
Returns the payment auto recharge preferences.
GET /payment/auto_recharge_prefs
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/payment/auto_recharge_prefs"
Returns: enabled (boolean), id (string), invoice_enabled (boolean), preference (enum: credit_paypal, ach), recharge_amount (string), record_type (string), threshold_amount (string)
Update payment auto recharge preferences.
PATCH /payment/auto_recharge_prefs
Optional: enabled (boolean), invoice_enabled (boolean), preference (enum: credit_paypal, ach), recharge_amount (string), threshold_amount (string)
bashcurl \ -X PATCH \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ "https://api.telnyx.com/v2/payment/auto_recharge_prefs"
Returns: enabled (boolean), id (string), invoice_enabled (boolean), preference (enum: credit_paypal, ach), recharge_amount (string), record_type (string), threshold_amount (string)
List all user tags.
GET /user_tags
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/user_tags"
Returns: number_tags (arraystring]), outbound_profile_tags (arraystring])
POST /v2/payment/stored_payment_transactions — Required: amount
bashcurl \ -X POST \ -H "Authorization: Bearer $TELNYX_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "amount": "120.00" }' \ "https://api.telnyx.com/v2/v2/payment/stored_payment_transactions"
Returns: amount_cents (integer), amount_currency (string), auto_recharge (boolean), created_at (date-time), id (string), processor_status (string), record_type (enum: transaction), transaction_processing_type (enum: stored_payment)
Lists webhook_deliveries for the authenticated user
GET /webhook_deliveries
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/webhook_deliveries"
Returns: attempts (arrayobject]), finished_at (date-time), id (uuid), record_type (string), started_at (date-time), status (enum: delivered, failed), user_id (uuid), webhook (object)
Provides webhook_delivery debug data, such as timestamps, delivery status and attempts.
GET /webhook_deliveries/{id}
bashcurl -H "Authorization: Bearer $TELNYX_API_KEY" "https://api.telnyx.com/v2/webhook_deliveries/C9C0797E-901D-4349-A33C-C2C8F31A92C2"
Returns: attempts (arrayobject]), finished_at (date-time), id (uuid), record_type (string), started_at (date-time), status (enum: delivered, failed), user_id (uuid), webhook (object)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 11,092 | 2,838 | -74% | 1 | 1 | 0% | 2,147 | 3,263 | +52% | 0 | 0 | — |
case-02 | fail→pass | 7,830 | 3,112 | -60% | 1 | 1 | 0% | 1,468 | 3,268 | +123% | 0 | 0 | — |
case-03 | fail→pass | 5,826 | 2,088 | -64% | 1 | 1 | 0% | 1,109 | 2,982 | +169% | 0 | 0 | — |
case-04 | pass→pass | 5,595 | 2,335 | -58% | 1 | 1 | 0% | 991 | 3,039 | +207% | 0 | 0 | — |
case-05 | fail→pass | 10,381 | 2,489 | -76% | 1 | 1 | 0% | 1,909 | 3,137 | +64% | 0 | 0 | — |
case-06 | pass→pass | 8,556 | 2,944 | -66% | 1 | 1 | 0% | 1,657 | 3,119 | +88% | 0 | 0 | — |
case-07 | fail→pass | 4,265 | 2,240 | -47% | 1 | 1 | 0% | 769 | 2,983 | +288% | 0 | 0 | — |
case-08 | fail→pass | 5,152 | 1,895 | -63% | 1 | 1 | 0% | 697 | 3,010 | +332% | 0 | 0 | — |
case-09 | fail→pass | 5,966 | 1,935 | -68% | 1 | 1 | 0% | 1,136 | 2,982 | +163% | 0 | 0 | — |
case-10 | fail→pass | 5,202 | 1,777 | -66% | 1 | 1 | 0% | 922 | 2,916 | +216% | 0 | 0 | — |
case-11 | fail→pass | 7,816 | 2,943 | -62% | 1 | 1 | 0% | 1,500 | 3,193 | +113% | 0 | 0 | — |
case-12 | pass→pass | 6,063 | 2,492 | -59% | 1 | 1 | 0% | 1,141 | 3,050 | +167% | 0 | 0 | — |
case-13 | fail→pass | 7,391 | 1,766 | -76% | 1 | 1 | 0% | 1,386 | 2,991 | +116% | 0 | 0 | — |
case-14 | pass→pass | 6,880 | 2,283 | -67% | 1 | 1 | 0% | 1,234 | 3,046 | +147% | 0 | 0 | — |
case-15 | pass→pass | 13,737 | 7,104 | -48% | 1 | 1 | 0% | 2,691 | 4,039 | +50% | 0 | 0 | — |
case-16 | fail→pass | 5,153 | 3,269 | -37% | 1 | 1 | 0% | 1,002 | 3,255 | +225% | 0 | 0 | — |
case-17 | pass→pass | 6,392 | 2,243 | -65% | 1 | 1 | 0% | 1,131 | 3,040 | +169% | 0 | 0 | — |
case-18 | pass→pass | 3,033 | 2,182 | -28% | 1 | 1 | 0% | 481 | 2,982 | +520% | 0 | 0 | — |
case-19 | pass→pass | 7,124 | 1,443 | -80% | 1 | 1 | 0% | 1,179 | 2,864 | +143% | 0 | 0 | — |
case-20 | pass→pass | 6,606 | 3,605 | -45% | 1 | 1 | 0% | 1,221 | 3,319 | +172% | 0 | 0 | — |
case-21 | fail→pass | 5,215 | 3,227 | -38% | 1 | 1 | 0% | 983 | 3,329 | +239% | 0 | 0 | — |
case-22 | pass→pass | 5,306 | 3,188 | -40% | 1 | 1 | 0% | 1,027 | 3,197 | +211% | 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. 22 cases were attempted. The headline lift of +55 percentage points is the difference between those two pass rates over the 22 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.