{"id":"b8f3cbbd-04aa-4a5b-acf1-116eed8b8288","shortId":"WHZBVA","kind":"skill","title":"telnyx-account-javascript","tagline":">-","description":"<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->\n\n# Telnyx Account - JavaScript\n\n## Installation\n\n```bash\nnpm install telnyx\n```\n\n## Setup\n\n```javascript\nimport Telnyx from 'telnyx';\n\nconst client = new Telnyx({\n  apiKey: process.env['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```javascript\ntry {\n  const result = await client.messages.send({ to: '+13125550001', from: '+13125550002', text: 'Hello' });\n} catch (err) {\n  if (err instanceof Telnyx.APIConnectionError) {\n    console.error('Network error — check connectivity and retry');\n  } else if (err instanceof Telnyx.RateLimitError) {\n    // 429: rate limited — wait and retry with exponential backoff\n    const retryAfter = err.headers?.['retry-after'] || 1;\n    await new Promise(r => setTimeout(r, retryAfter * 1000));\n  } else if (err instanceof Telnyx.APIError) {\n    console.error(`API error ${err.status}: ${err.message}`);\n    if (err.status === 422) {\n      console.error('Validation error — check required fields and formats');\n    }\n  }\n}\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 await (const item of 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```javascript\n// Automatically fetches more pages as needed.\nfor await (const auditEventListResponse of client.auditEvents.list()) {\n  console.log(auditEventListResponse.id);\n}\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```javascript\nconst balance = await client.balance.retrieve();\n\nconsole.log(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```javascript\nconst chargesBreakdown = await client.chargesBreakdown.retrieve({ start_date: '2025-05-01' });\n\nconsole.log(chargesBreakdown.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```javascript\nconst chargesSummary = await client.chargesSummary.retrieve({\n  end_date: '2025-06-01',\n  start_date: '2025-05-01',\n});\n\nconsole.log(chargesSummary.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```javascript\n// Automatically fetches more pages as needed.\nfor await (const detailRecordListResponse of client.detailRecords.list()) {\n  console.log(detailRecordListResponse);\n}\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```javascript\n// Automatically fetches more pages as needed.\nfor await (const invoiceListResponse of client.invoices.list()) {\n  console.log(invoiceListResponse.file_id);\n}\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```javascript\nconst invoice = await client.invoices.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(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```javascript\nconst autoRechargePrefs = await client.payment.autoRechargePrefs.list();\n\nconsole.log(autoRechargePrefs.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```javascript\nconst autoRechargePref = await client.payment.autoRechargePrefs.update();\n\nconsole.log(autoRechargePref.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```javascript\nconst userTags = await client.userTags.list();\n\nconsole.log(userTags.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```javascript\nconst response = await client.payment.createStoredPaymentTransaction({ amount: '120.00' });\n\nconsole.log(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```javascript\n// Automatically fetches more pages as needed.\nfor await (const webhookDeliveryListResponse of client.webhookDeliveries.list()) {\n  console.log(webhookDeliveryListResponse.id);\n}\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```javascript\nconst webhookDelivery = await client.webhookDeliveries.retrieve(\n  'C9C0797E-901D-4349-A33C-C2C8F31A92C2',\n);\n\nconsole.log(webhookDelivery.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","javascript","team-telnyx","agent-skills","ai-coding-agent","claude-code","cpaas","cursor","iot","llm","sdk"],"capabilities":["skill","source-team-telnyx","skill-telnyx-account-javascript","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-javascript","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 (8,310 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:40.365Z","embedding":null,"createdAt":"2026-04-18T22:05:55.661Z","updatedAt":"2026-04-22T12:54:40.365Z","lastSeenAt":"2026-04-22T12:54:40.365Z","tsv":"'+13125550001':80 '+13125550002':82 '-01':351,405,410 '-05':350,409 '-06':404 '/audit_events':226 '/balance':289 '/charges_breakdown':341 '/charges_summary':395 '/detail_records':445 '/invoices':579,626 '/payment/auto_recharge_prefs':672,712 '/user_tags':767 '/v2/payment/stored_payment_transactions':791 '/webhook_deliveries':844,907 '1':118 '1000':126 '120.00':800 '182bd5e5':634 '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e':633 '2025':349,403,408 '31':338,392 '401':66,151 '403':155 '404':158 '422':62,139,162 '429':59,103,168 '4349':917 '4fe4':636 '6e1a':635 '901d':916 'a33c':919 'a33c-c2c8f31a92c2':918 'a799':637 'aa6d9a6ab26e':638 'account':3,6,222,253,255 'account-rel':221 'ach':692,723,749 'across':440 'alreadi':42 'altern':243 'alway':67 'amount':694,700,725,728,751,757,793,799,804,807 'api':26,50,133,153 'apikey':23 'array':263,361,506,778,783,862,925 'assum':39 'attempt':861,905,924 'audit':200,206,209 'auditeventlistrespons':237 'auditeventlistresponse.id':241 'authent':64,841 'auto':183,662,668,703,708,810 'auto-pagin':182 'automat':198,228,447,581,846 'autorechargepref':675,732 'autorechargepref.data':736 'autorechargeprefs.data':679 'avail':298 'await':77,119,188,235,293,345,399,454,588,631,676,733,771,797,853,912 'backoff':111,174 'balanc':286,292,301,313 'balance.data':296 'bash':9 'best':214 'best-effort':213 'boolean':509,522,604,652,682,687,715,718,739,744,812 'breakdown':317,321 'c2c8f31a92c2':920 'c9c0797e':915 'c9c0797e-901d':914 'call':51 'cannot':336,390 'carrier':462,464 'catch':85 'cent':805 'chang':224,248,259,262 'charg':316,324,374,381 'chargesbreakdown':344 'chargesbreakdown.data':353 'chargessummari':398 'chargessummary.data':412 'check':94,143,165 'cld':467 'cli':469 'client':20,40 'client.auditevents.list':239 'client.balance.retrieve':294 'client.chargesbreakdown.retrieve':346 'client.chargessummary.retrieve':400 'client.detailrecords.list':458 'client.invoices.list':592 'client.invoices.retrieve':632 'client.messages.send':78 'client.payment.autorechargeprefs.list':677 'client.payment.autorechargeprefs.update':734 'client.payment.createstoredpaymenttransaction':798 'client.usertags.list':772 'client.webhookdeliveries.list':857 'client.webhookdeliveries.retrieve':913 'code':72,150,479,543 'common':148 'complet':471 'connect':95 'consist':217 'console.error':91,132,140 'console.log':240,295,352,411,459,593,639,678,735,773,801,858,921 'const':19,75,112,189,236,291,343,397,455,589,629,674,731,769,795,854,910 'cost':476 'countri':478,542 'creat':265,481,785,813 'credit':299,303,690,721,747 'currenc':306,355,414,486,808 'data':898 'date':268,331,334,348,358,359,364,365,385,388,402,407,417,418,420,421,474,484,539,563,607,610,655,658,816,867,877,930,940 'date-tim':267,473,483,538,562,815,866,876,929,939 'day':339,393 'debug':897 'default':31 'deliv':549,881,944 'deliveri':488,491,496,835,838,890,896,902 'detail':287,320,433,438,891 'detailrecordlistrespons':456,460 'direct':501 'dlr':550,552 'download':642 'effort':215 'els':98,127 'email':367,368,427,428 'enabl':681,686,714,717,738,743 'end':357,401,416,606,654 'entri':208 'enum':251,312,502,514,546,689,720,746,825,830,880,943 'err':86,88,100,129 'err.headers':114 'err.message':136 'err.status':135,138 'error':47,56,61,65,69,93,134,142,149,164,505 'eventu':216 'exampl':37 'exceed':337,391 'exponenti':110,173 'fail':53,557,882,945 'failov':493 'fee':465 'fetch':229,448,582,847 'field':145,166 'file':597,645 'find':888 'finish':864,927 'format':147,167 'found':161 'fteu':508 'get':225,284,288,314,340,372,394,444,578,613,625,671,766,843,906 'gw':547,555 'handl':48,68 'hello':84 'id':245,270,273,279,282,370,430,526,566,595,598,601,616,627,646,649,683,740,818,869,884,893,908,932,947 'identifi':624 'import':15,175 'inbound':503 'initi':43 'instal':8,11 'instanceof':89,101,130 'insuffici':156 'integ':524,806 'invalid':152 'invoic':571,577,600,614,620,630,648,685,716,742 'invoice.data':640 'invoicelistrespons':590 'invoicelistresponse.file':594 'item':190 'iter':185,194 'javascript':4,7,14,73,227,290,342,396,446,580,628,673,730,768,794,845,909 'key':27,154 'limit':58,105,170,304 'list':178,199,204,570,575,661,759,762,833,836 'log':201,207,210 'made':249 'manag':254 'mcc':510 'member':258 'messag':512 'method':179 'mms':516 'mnc':518 'month':315,323,373,380 'name':529 'need':233,452,586,851 'net':521 'network':55,92 'new':21,120 'note':176 'npm':10 'null':247,264 'number':327,776 'object':362,423,425,863,887,926,950 'omit':35 'option':713 'organ':257,272 'outbound':504,780 'owner':256 'page':197,231,450,584,849 'pagin':177,184,574 'paid':603,651 'part':523 'patch':711 'payment':667,707,788,832 'paypal':691,722,748 'pend':308 'period':605,608,653,656 'permiss':157 'phone':326 'platform':443 'post':790 'prefer':664,670,688,705,710,719,745 'process':828 'process.env':24 'processor':820 'product':71 'profil':525,528,781 'promis':121 'provid':894 'r':122,124 'rang':332,335,386,389 'rate':57,104,169,531 'rcs':517 'receiv':554 'recharg':663,669,693,704,709,724,750,811 'record':218,275,310,434,439,533,696,753,823,871,934 'reject':556 'relat':223 'requir':144,792 'resourc':159,244,278 'respons':796 'response.data':802 'result':76,192,360 'retri':97,108,116,171 'retriev':202,318,376,572,617 'retry-aft':115 'retryaft':113,125 'return':180,242,297,354,413,461,596,641,665,680,737,775,803,860,923 'search':432,435 'sent':536 'settimeout':123 'setup':13 'shown':45 'signific':220 'singl':619 'skill' 'skill-telnyx-account-javascript' 'sms':515 'sourc':541 'source-team-telnyx' 'specifi':330,384 'start':347,363,406,419,609,657,874,937 'status':489,492,497,545,821,879,903,942 'store':787,831 'string':246,261,277,280,300,302,305,307,309,356,371,415,431,463,466,468,470,477,480,487,490,495,500,507,511,519,527,530,532,535,544,559,567,569,684,695,698,701,726,729,741,752,755,758,779,784,809,819,822,873,936 'summari':375,378,422 'tag':558,761,765,777,782 'telnyx':2,5,12,16,18,22,25,252,442 'telnyx-account-javascript':1 'telnyx.apiconnectionerror':90 'telnyx.apierror':131 'telnyx.ratelimiterror':102 'text':83 'threshold':699,727,756 'time':269,475,485,540,564,817,868,878,931,941 'timeout':548,553 'timestamp':901 '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':424 'transact':789,826,827 'tri':74 'type':260,276,311,513,534,697,754,824,829,872,935 'unconfirm':551 'uniqu':623 'updat':560,702,706 'uri':612,644,660 'url':494,499,611,643,659 'use':186 'user':281,285,366,369,426,429,565,760,764,842,883,946 'usertag':770 'usertags.data':774 'uuid':271,274,283,568,599,602,647,650,870,885,933,948 'valid':60,141,163 'wait':106 'webhook':498,834,837,886,889,895,949 'webhookdeliveri':911 'webhookdelivery.data':922 'webhookdeliverylistrespons':855 'webhookdeliverylistresponse.id':859","prices":[{"id":"b573ad27-6597-4dab-94e0-39dd06effbc5","listingId":"b8f3cbbd-04aa-4a5b-acf1-116eed8b8288","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:05:55.661Z"}],"sources":[{"listingId":"b8f3cbbd-04aa-4a5b-acf1-116eed8b8288","source":"github","sourceId":"team-telnyx/ai/telnyx-account-javascript","sourceUrl":"https://github.com/team-telnyx/ai/tree/main/skills/telnyx-account-javascript","isPrimary":false,"firstSeenAt":"2026-04-18T22:05:55.661Z","lastSeenAt":"2026-04-22T12:54:40.365Z"}],"details":{"listingId":"b8f3cbbd-04aa-4a5b-acf1-116eed8b8288","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"team-telnyx","slug":"telnyx-account-javascript","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":"40c7c4cf1eae75ef176c520c6cb51bfda427aaa9","skill_md_path":"skills/telnyx-account-javascript/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/team-telnyx/ai/tree/main/skills/telnyx-account-javascript"},"layout":"multi","source":"github","category":"ai","frontmatter":{"name":"telnyx-account-javascript","description":">-"},"skills_sh_url":"https://skills.sh/team-telnyx/ai/telnyx-account-javascript"},"updatedAt":"2026-04-22T12:54:40.365Z"}}