{"id":"cda5b75d-7079-41af-951c-1f6f24fa0899","shortId":"QncYnU","kind":"skill","title":"telnyx-account-python","tagline":">-","description":"<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->\n\n# Telnyx Account - Python\n\n## Installation\n\n```bash\npip install telnyx\n```\n\n## Setup\n\n```python\nimport os\nfrom telnyx import Telnyx\n\nclient = Telnyx(\n    api_key=os.environ.get(\"TELNYX_API_KEY\"),  # This is the default and can be omitted\n)\n```\n\nAll examples below assume `client` is already initialized as shown above.\n\n## Error Handling\n\nAll API calls can fail with network errors, rate limits (429), validation errors (422),\nor authentication errors (401). Always handle errors in production code:\n\n```python\nimport telnyx\n\ntry:\n    result = client.messages.send(to=\"+13125550001\", from_=\"+13125550002\", text=\"Hello\")\nexcept telnyx.APIConnectionError:\n    print(\"Network error — check connectivity and retry\")\nexcept telnyx.RateLimitError:\n    # 429: rate limited — wait and retry with exponential backoff\n    import time\n    time.sleep(1)  # Check Retry-After header for actual delay\nexcept telnyx.APIStatusError as e:\n    print(f\"API error {e.status_code}: {e.message}\")\n    if e.status_code == 422:\n        print(\"Validation error — check required fields and formats\")\n```\n\nCommon error codes: `401` invalid API key, `403` insufficient permissions,\n`404` resource not found, `422` validation error (check field formats),\n`429` rate limited (retry with exponential backoff).\n\n## Important Notes\n\n- **Pagination:** List methods return an auto-paginating iterator. Use `for item in page_result:` to iterate through all pages automatically.\n\n## List Audit Logs\n\nRetrieve a list of audit log entries. Audit logs are a best-effort, eventually consistent record of significant account-related changes.\n\n`GET /audit_events`\n\n```python\npage = client.audit_events.list()\npage = page.data[0]\nprint(page.id)\n```\n\nReturns: `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)\n\n## Get user balance details\n\n`GET /balance`\n\n```python\nbalance = client.balance.retrieve()\nprint(balance.data)\n```\n\nReturns: `available_credit` (string), `balance` (string), `credit_limit` (string), `currency` (string), `pending` (string), `record_type` (enum: balance)\n\n## Get monthly charges breakdown\n\nRetrieve a detailed breakdown of monthly charges for phone numbers in a specified date range. The date range cannot exceed 31 days.\n\n`GET /charges_breakdown`\n\n```python\nfrom datetime import date\n\ncharges_breakdown = client.charges_breakdown.retrieve(\n    start_date=date.fromisoformat(\"2025-05-01\"),\n)\nprint(charges_breakdown.data)\n```\n\nReturns: `currency` (string), `end_date` (date), `results` (array[object]), `start_date` (date), `user_email` (email), `user_id` (string)\n\n## Get monthly charges summary\n\nRetrieve a summary of monthly charges for a specified date range. The date range cannot exceed 31 days.\n\n`GET /charges_summary`\n\n```python\nfrom datetime import date\n\ncharges_summary = client.charges_summary.retrieve(\n    end_date=date.fromisoformat(\"2025-06-01\"),\n    start_date=date.fromisoformat(\"2025-05-01\"),\n)\nprint(charges_summary.data)\n```\n\nReturns: `currency` (string), `end_date` (date), `start_date` (date), `summary` (object), `total` (object), `user_email` (email), `user_id` (string)\n\n## Search detail records\n\nSearch for any detail record across the Telnyx Platform\n\n`GET /detail_records`\n\n```python\npage = client.detail_records.list()\npage = page.data[0]\nprint(page)\n```\n\nReturns: `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` (array[string]), `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)\n\n## List invoices\n\nRetrieve a paginated list of invoices.\n\n`GET /invoices`\n\n```python\npage = client.invoices.list()\npage = page.data[0]\nprint(page.file_id)\n```\n\nReturns: `file_id` (uuid), `invoice_id` (uuid), `paid` (boolean), `period_end` (date), `period_start` (date), `url` (uri)\n\n## Get invoice by ID\n\nRetrieve a single invoice by its unique identifier.\n\n`GET /invoices/{id}`\n\n```python\ninvoice = client.invoices.retrieve(\n    id=\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n)\nprint(invoice.data)\n```\n\nReturns: `download_url` (uri), `file_id` (uuid), `invoice_id` (uuid), `paid` (boolean), `period_end` (date), `period_start` (date), `url` (uri)\n\n## List auto recharge preferences\n\nReturns the payment auto recharge preferences.\n\n`GET /payment/auto_recharge_prefs`\n\n```python\nauto_recharge_prefs = client.payment.auto_recharge_prefs.list()\nprint(auto_recharge_prefs.data)\n```\n\nReturns: `enabled` (boolean), `id` (string), `invoice_enabled` (boolean), `preference` (enum: credit_paypal, ach), `recharge_amount` (string), `record_type` (string), `threshold_amount` (string)\n\n## Update auto recharge preferences\n\nUpdate payment auto recharge preferences.\n\n`PATCH /payment/auto_recharge_prefs`\n\nOptional: `enabled` (boolean), `invoice_enabled` (boolean), `preference` (enum: credit_paypal, ach), `recharge_amount` (string), `threshold_amount` (string)\n\n```python\nauto_recharge_pref = client.payment.auto_recharge_prefs.update()\nprint(auto_recharge_pref.data)\n```\n\nReturns: `enabled` (boolean), `id` (string), `invoice_enabled` (boolean), `preference` (enum: credit_paypal, ach), `recharge_amount` (string), `record_type` (string), `threshold_amount` (string)\n\n## List User Tags\n\nList all user tags.\n\n`GET /user_tags`\n\n```python\nuser_tags = client.user_tags.list()\nprint(user_tags.data)\n```\n\nReturns: `number_tags` (array[string]), `outbound_profile_tags` (array[string])\n\n## Create a stored payment transaction\n\n`POST /v2/payment/stored_payment_transactions` — Required: `amount`\n\n```python\nresponse = client.payment.create_stored_payment_transaction(\n    amount=\"120.00\",\n)\nprint(response.data)\n```\n\nReturns: `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)\n\n## List webhook deliveries\n\nLists webhook_deliveries for the authenticated user\n\n`GET /webhook_deliveries`\n\n```python\npage = client.webhook_deliveries.list()\npage = page.data[0]\nprint(page.id)\n```\n\nReturns: `attempts` (array[object]), `finished_at` (date-time), `id` (uuid), `record_type` (string), `started_at` (date-time), `status` (enum: delivered, failed), `user_id` (uuid), `webhook` (object)\n\n## Find webhook_delivery details by ID\n\nProvides webhook_delivery debug data, such as timestamps, delivery status and attempts.\n\n`GET /webhook_deliveries/{id}`\n\n```python\nwebhook_delivery = client.webhook_deliveries.retrieve(\n    \"C9C0797E-901D-4349-A33C-C2C8F31A92C2\",\n)\nprint(webhook_delivery.data)\n```\n\nReturns: `attempts` (array[object]), `finished_at` (date-time), `id` (uuid), `record_type` (string), `started_at` (date-time), `status` (enum: delivered, failed), `user_id` (uuid), `webhook` (object)","tags":["telnyx","account","python","team-telnyx","agent-skills","ai-coding-agent","claude-code","cpaas","cursor","iot","llm","sdk"],"capabilities":["skill","source-team-telnyx","skill-telnyx-account-python","topic-agent-skills","topic-ai-coding-agent","topic-claude-code","topic-cpaas","topic-cursor","topic-iot","topic-llm","topic-sdk","topic-sip","topic-sms","topic-speech-to-text","topic-telephony"],"categories":["ai"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/team-telnyx/ai/telnyx-account-python","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add team-telnyx/ai","source_repo":"https://github.com/team-telnyx/ai","install_from":"skills.sh"}},"qualityScore":"0.533","qualityRationale":"deterministic score 0.53 from registry signals: · indexed on github topic:agent-skills · 167 github stars · SKILL.md body (7,662 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T12:54:42.477Z","embedding":null,"createdAt":"2026-04-18T22:06:05.983Z","updatedAt":"2026-04-22T12:54:42.477Z","lastSeenAt":"2026-04-22T12:54:42.477Z","tsv":"'+13125550001':81 '+13125550002':83 '-01':338,396,402 '-05':337,401 '-06':395 '/audit_events':218 '/balance':274 '/charges_breakdown':324 '/charges_summary':382 '/detail_records':437 '/invoices':564,604 '/payment/auto_recharge_prefs':649,689 '/user_tags':744 '/v2/payment/stored_payment_transactions':767 '/webhook_deliveries':821,877 '0':224,443,570,827 '1':109 '120.00':777 '182bd5e5':611 '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e':610 '2025':336,394,400 '31':321,379 '401':67,144 '403':148 '404':151 '422':63,132,155 '429':60,97,161 '4349':886 '4fe4':613 '6e1a':612 '901d':885 'a33c':888 'a33c-c2c8f31a92c2':887 'a799':614 'aa6d9a6ab26e':615 'account':3,6,214,238,240 'account-rel':213 'ach':669,700,726 'across':432 'actual':116 'alreadi':43 'altern':228 'alway':68 'amount':671,677,702,705,728,734,769,776,781,784 'api':23,27,51,124,146 'array':248,348,491,754,759,832,894 'assum':40 'attempt':831,875,893 'audit':192,198,201 'authent':65,818 'auto':176,639,645,651,680,685,708,787 'auto-pagin':175 'auto_recharge_pref.data':713 'auto_recharge_prefs.data':656 'automat':190 'avail':281 'backoff':105,167 'balanc':271,276,284,296 'balance.data':279 'bash':9 'best':206 'best-effort':205 'boolean':494,507,582,629,659,664,692,695,716,721,789 'breakdown':300,304,331 'c2c8f31a92c2':889 'c9c0797e':884 'c9c0797e-901d':883 'call':52 'cannot':319,377 'carrier':447,449 'cent':782 'chang':216,233,244,247 'charg':299,307,330,361,368,388 'charges_breakdown.data':340 'charges_summary.data':404 'check':91,110,136,158 'cld':452 'cli':454 'client':21,41 'client.audit_events.list':221 'client.balance.retrieve':277 'client.charges_breakdown.retrieve':332 'client.charges_summary.retrieve':390 'client.detail_records.list':440 'client.invoices.list':567 'client.invoices.retrieve':608 'client.messages.send':79 'client.payment.auto_recharge_prefs.list':654 'client.payment.auto_recharge_prefs.update':711 'client.payment.create':772 'client.user_tags.list':748 'client.webhook_deliveries.list':824 'client.webhook_deliveries.retrieve':882 'code':73,127,131,143,464,528 'common':141 'complet':456 'connect':92 'consist':209 'cost':461 'countri':463,527 'creat':250,466,761,790 'credit':282,286,667,698,724 'currenc':289,342,406,471,785 'data':868 'date':253,314,317,329,334,345,346,351,352,372,375,387,392,398,409,410,412,413,459,469,524,548,585,588,632,635,793,837,847,899,909 'date-tim':252,458,468,523,547,792,836,846,898,908 'date.fromisoformat':335,393,399 'datetim':327,385 'day':322,380 'debug':867 'default':32 'delay':117 'deliv':534,851,913 'deliveri':473,476,481,812,815,860,866,872,881 'detail':272,303,425,430,861 'direct':486 'dlr':535,537 'download':619 'e':121 'e.message':128 'e.status':126,130 'effort':207 'email':354,355,419,420 'enabl':658,663,691,694,715,720 'end':344,391,408,584,631 'entri':200 'enum':236,295,487,499,531,666,697,723,802,807,850,912 'error':48,57,62,66,70,90,125,135,142,157,490 'eventu':208 'exampl':38 'exceed':320,378 'except':86,95,118 'exponenti':104,166 'f':123 'fail':54,542,852,914 'failov':478 'fee':450 'field':138,159 'file':575,622 'find':858 'finish':834,896 'format':140,160 'found':154 'fteu':493 'get':217,269,273,297,323,359,381,436,563,591,603,648,743,820,876 'gw':532,540 'handl':49,69 'header':114 'hello':85 'id':230,255,258,264,267,357,422,511,551,573,576,579,594,605,609,623,626,660,717,795,839,854,863,878,901,916 'identifi':602 'import':15,19,75,106,168,328,386 'inbound':488 'initi':44 'instal':8,11 'insuffici':149 'integ':509,783 'invalid':145 'invoic':556,562,578,592,598,607,625,662,693,719 'invoice.data':617 'item':181 'iter':178,186 'key':24,28,147 'limit':59,99,163,287 'list':171,191,196,555,560,638,736,739,810,813 'log':193,199,202 'made':234 'manag':239 'mcc':495 'member':243 'messag':497 'method':172 'mms':501 'mnc':503 'month':298,306,360,367 'name':514 'net':506 'network':56,89 'note':169 'null':232,249 'number':310,752 'object':349,415,417,833,857,895,919 'omit':36 'option':690 'organ':242,257 'os':16 'os.environ.get':25 'outbound':489,756 'owner':241 'page':183,189,220,222,439,441,445,566,568,823,825 'page.data':223,442,569,826 'page.file':572 'page.id':226,829 'pagin':170,177,559 'paid':581,628 'part':508 'patch':688 'payment':644,684,764,774,809 'paypal':668,699,725 'pend':291 'period':583,586,630,633 'permiss':150 'phone':309 'pip':10 'platform':435 'post':766 'pref':653,710 'prefer':641,647,665,682,687,696,722 'print':88,122,133,225,278,339,403,444,571,616,655,712,749,778,828,890 'process':805 'processor':797 'product':72 'profil':510,513,757 'provid':864 'python':4,7,14,74,219,275,325,383,438,565,606,650,707,745,770,822,879 'rang':315,318,373,376 'rate':58,98,162,516 'rcs':502 'receiv':539 'recharg':640,646,652,670,681,686,701,709,727,788 'record':210,260,293,426,431,518,673,730,800,841,903 'reject':541 'relat':215 'requir':137,768 'resourc':152,229,263 'respons':771 'response.data':779 'result':78,184,347 'retri':94,102,112,164 'retriev':194,301,363,557,595 'retry-aft':111 'return':173,227,280,341,405,446,574,618,642,657,714,751,780,830,892 'search':424,427 'sent':521 'setup':13 'shown':46 'signific':212 'singl':597 'skill' 'skill-telnyx-account-python' 'sms':500 'sourc':526 'source-team-telnyx' 'specifi':313,371 'start':333,350,397,411,587,634,844,906 'status':474,477,482,530,798,849,873,911 'store':763,773,808 'string':231,246,262,265,283,285,288,290,292,343,358,407,423,448,451,453,455,462,465,472,475,480,485,492,496,504,512,515,517,520,529,544,552,554,661,672,675,678,703,706,718,729,732,735,755,760,786,796,799,843,905 'summari':362,365,389,414 'tag':543,738,742,747,753,758 'telnyx':2,5,12,18,20,22,26,76,237,434 'telnyx-account-python':1 'telnyx.apiconnectionerror':87 'telnyx.apistatuserror':119 'telnyx.ratelimiterror':96 'text':84 'threshold':676,704,733 'time':107,254,460,470,525,549,794,838,848,900,910 'time.sleep':108 'timeout':533,538 'timestamp':871 'topic-agent-skills' 'topic-ai-coding-agent' 'topic-claude-code' 'topic-cpaas' 'topic-cursor' 'topic-iot' 'topic-llm' 'topic-sdk' 'topic-sip' 'topic-sms' 'topic-speech-to-text' 'topic-telephony' 'total':416 'transact':765,775,803,804 'tri':77 'type':245,261,294,498,519,674,731,801,806,842,904 'unconfirm':536 'uniqu':601 'updat':545,679,683 'uri':590,621,637 'url':479,484,589,620,636 'use':179 'user':266,270,353,356,418,421,550,737,741,746,819,853,915 'user_tags.data':750 'uuid':256,259,268,553,577,580,624,627,840,855,902,917 'valid':61,134,156 'wait':100 'webhook':483,811,814,856,859,865,880,918 'webhook_delivery.data':891","prices":[{"id":"f3b63e86-8a8d-4e1c-baf5-0440b8f94b35","listingId":"cda5b75d-7079-41af-951c-1f6f24fa0899","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"team-telnyx","category":"ai","install_from":"skills.sh"},"createdAt":"2026-04-18T22:06:05.983Z"}],"sources":[{"listingId":"cda5b75d-7079-41af-951c-1f6f24fa0899","source":"github","sourceId":"team-telnyx/ai/telnyx-account-python","sourceUrl":"https://github.com/team-telnyx/ai/tree/main/skills/telnyx-account-python","isPrimary":false,"firstSeenAt":"2026-04-18T22:06:05.983Z","lastSeenAt":"2026-04-22T12:54:42.477Z"}],"details":{"listingId":"cda5b75d-7079-41af-951c-1f6f24fa0899","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"team-telnyx","slug":"telnyx-account-python","github":{"repo":"team-telnyx/ai","stars":167,"topics":["agent-skills","ai","ai-coding-agent","claude-code","cpaas","cursor","iot","llm","sdk","sip","sms","speech-to-text","telephony","telnyx","tts","twilio-migration","voice-agents","voice-ai","webrtc","windsurf"],"license":"mit","html_url":"https://github.com/team-telnyx/ai","pushed_at":"2026-04-21T22:09:49Z","description":"Official one-stop shop for AI Agents and developers building with Telnyx.","skill_md_sha":"0c7e9600dacc3176b6864c0ecfff369ae027976b","skill_md_path":"skills/telnyx-account-python/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/team-telnyx/ai/tree/main/skills/telnyx-account-python"},"layout":"multi","source":"github","category":"ai","frontmatter":{"name":"telnyx-account-python","description":">-"},"skills_sh_url":"https://skills.sh/team-telnyx/ai/telnyx-account-python"},"updatedAt":"2026-04-22T12:54:42.477Z"}}