{"id":"cfec827a-34ac-443a-8a07-983f87a99ae7","shortId":"A5MD2x","kind":"skill","title":"telnyx-account-management-javascript","tagline":">-","description":"<!-- Auto-generated from Telnyx OpenAPI specs. Do not edit. -->\n\n# Telnyx Account Management - 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## Lists accounts managed by the current user.\n\nLists the accounts managed by the current user. Users need to be explictly approved by Telnyx in order to become manager accounts.\n\n`GET /managed_accounts`\n\n```javascript\n// Automatically fetches more pages as needed.\nfor await (const managedAccountListResponse of client.managedAccounts.list()) {\n  console.log(managedAccountListResponse.id);\n}\n```\n\nReturns: `api_user` (string), `created_at` (string), `email` (email), `id` (uuid), `managed_account_allow_custom_pricing` (boolean), `manager_account_id` (string), `organization_name` (string), `record_type` (enum: managed_account), `rollup_billing` (boolean), `updated_at` (string)\n\n## Create a new managed account.\n\nCreate a new managed account owned by the authenticated user. You need to be explictly approved by Telnyx in order to become a manager account.\n\n`POST /managed_accounts` — Required: `business_name`\n\nOptional: `email` (string), `managed_account_allow_custom_pricing` (boolean), `password` (string), `rollup_billing` (boolean)\n\n```javascript\nconst managedAccount = await client.managedAccounts.create({\n  business_name: \"Larry's Cat Food Inc\",\n});\n\nconsole.log(managedAccount.data);\n```\n\nReturns: `api_key` (string), `api_token` (string), `api_user` (string), `balance` (object), `created_at` (string), `email` (email), `id` (uuid), `managed_account_allow_custom_pricing` (boolean), `manager_account_id` (string), `organization_name` (string), `record_type` (enum: managed_account), `rollup_billing` (boolean), `updated_at` (string)\n\n## Display information about allocatable global outbound channels for the current user.\n\nDisplay information about allocatable global outbound channels for the current user. Only usable by account managers.\n\n`GET /managed_accounts/allocatable_global_outbound_channels`\n\n```javascript\nconst response = await client.managedAccounts.getAllocatableGlobalOutboundChannels();\n\nconsole.log(response.data);\n```\n\nReturns: `allocatable_global_outbound_channels` (integer), `managed_account_allow_custom_pricing` (boolean), `record_type` (string), `total_global_channels_allocated` (integer)\n\n## Retrieve a managed account\n\nRetrieves the details of a single managed account.\n\n`GET /managed_accounts/{id}`\n\n```javascript\nconst managedAccount = await client.managedAccounts.retrieve('550e8400-e29b-41d4-a716-446655440000');\n\nconsole.log(managedAccount.data);\n```\n\nReturns: `api_key` (string), `api_token` (string), `api_user` (string), `balance` (object), `created_at` (string), `email` (email), `id` (uuid), `managed_account_allow_custom_pricing` (boolean), `manager_account_id` (string), `organization_name` (string), `record_type` (enum: managed_account), `rollup_billing` (boolean), `updated_at` (string)\n\n## Update a managed account\n\nUpdate a single managed account.\n\n`PATCH /managed_accounts/{id}`\n\nOptional: `managed_account_allow_custom_pricing` (boolean)\n\n```javascript\nconst managedAccount = await client.managedAccounts.update('550e8400-e29b-41d4-a716-446655440000');\n\nconsole.log(managedAccount.data);\n```\n\nReturns: `api_key` (string), `api_token` (string), `api_user` (string), `balance` (object), `created_at` (string), `email` (email), `id` (uuid), `managed_account_allow_custom_pricing` (boolean), `manager_account_id` (string), `organization_name` (string), `record_type` (enum: managed_account), `rollup_billing` (boolean), `updated_at` (string)\n\n## Disables a managed account\n\nDisables a managed account, forbidding it to use Telnyx services, including sending or receiving phone calls and SMS messages. Ongoing phone calls will not be affected. The managed account and its sub-users will no longer be able to log in via the mission control portal.\n\n`POST /managed_accounts/{id}/actions/disable`\n\n```javascript\nconst response = await client.managedAccounts.actions.disable('550e8400-e29b-41d4-a716-446655440000');\n\nconsole.log(response.data);\n```\n\nReturns: `api_key` (string), `api_token` (string), `api_user` (string), `balance` (object), `created_at` (string), `email` (email), `id` (uuid), `managed_account_allow_custom_pricing` (boolean), `manager_account_id` (string), `organization_name` (string), `record_type` (enum: managed_account), `rollup_billing` (boolean), `updated_at` (string)\n\n## Enables a managed account\n\nEnables a managed account and its sub-users to use Telnyx services.\n\n`POST /managed_accounts/{id}/actions/enable`\n\nOptional: `reenable_all_connections` (boolean)\n\n```javascript\nconst response = await client.managedAccounts.actions.enable('550e8400-e29b-41d4-a716-446655440000');\n\nconsole.log(response.data);\n```\n\nReturns: `api_key` (string), `api_token` (string), `api_user` (string), `balance` (object), `created_at` (string), `email` (email), `id` (uuid), `managed_account_allow_custom_pricing` (boolean), `manager_account_id` (string), `organization_name` (string), `record_type` (enum: managed_account), `rollup_billing` (boolean), `updated_at` (string)\n\n## Update the amount of allocatable global outbound channels allocated to a specific managed account.\n\n`PATCH /managed_accounts/{id}/update_global_channel_limit`\n\nOptional: `channel_limit` (integer)\n\n```javascript\nconst response = await client.managedAccounts.updateGlobalChannelLimit('550e8400-e29b-41d4-a716-446655440000');\n\nconsole.log(response.data);\n```\n\nReturns: `channel_limit` (integer), `email` (string), `id` (string), `manager_account_id` (string), `record_type` (string)\n\n## List organization users\n\nReturns a list of the users in your organization.\n\n`GET /organizations/users`\n\n```javascript\n// Automatically fetches more pages as needed.\nfor await (const organizationUser of client.organizations.users.list()) {\n  console.log(organizationUser.id);\n}\n```\n\nReturns: `created_at` (string), `email` (email), `groups` (array[object]), `id` (string), `last_sign_in_at` (string | null), `organization_user_bypasses_sso` (boolean), `record_type` (string), `user_status` (enum: enabled, disabled, blocked)\n\n## Get organization users groups report\n\nReturns a report of all users in your organization with their group memberships. This endpoint returns all users without pagination and always includes group information. The report can be retrieved in JSON or CSV format by sending specific content-type headers.\n\n`GET /organizations/users/users_groups_report`\n\n```javascript\nconst response = await client.organizations.users.getGroupsReport();\n\nconsole.log(response.data);\n```\n\nReturns: `created_at` (string), `email` (email), `groups` (array[object]), `id` (string), `last_sign_in_at` (string | null), `organization_user_bypasses_sso` (boolean), `record_type` (string), `user_status` (enum: enabled, disabled, blocked)\n\n## Get organization user\n\nReturns a user in your organization.\n\n`GET /organizations/users/{id}`\n\n```javascript\nconst user = await client.organizations.users.retrieve('550e8400-e29b-41d4-a716-446655440000');\n\nconsole.log(user.data);\n```\n\nReturns: `created_at` (string), `email` (email), `groups` (array[object]), `id` (string), `last_sign_in_at` (string | null), `organization_user_bypasses_sso` (boolean), `record_type` (string), `user_status` (enum: enabled, disabled, blocked)\n\n## Delete organization user\n\nDeletes a user in your organization.\n\n`POST /organizations/users/{id}/actions/remove`\n\n```javascript\nconst action = await client.organizations.users.actions.remove('550e8400-e29b-41d4-a716-446655440000');\n\nconsole.log(action.data);\n```\n\nReturns: `created_at` (string), `email` (email), `groups` (array[object]), `id` (string), `last_sign_in_at` (string | null), `organization_user_bypasses_sso` (boolean), `record_type` (string), `user_status` (enum: enabled, disabled, blocked)","tags":["telnyx","account","management","javascript","team-telnyx","agent-skills","ai-coding-agent","claude-code","cpaas","cursor","iot","llm"],"capabilities":["skill","source-team-telnyx","skill-telnyx-account-management-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-management-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 (9,348 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:41.088Z","embedding":null,"createdAt":"2026-04-18T22:05:58.951Z","updatedAt":"2026-04-22T12:54:41.088Z","lastSeenAt":"2026-04-22T12:54:41.088Z","tsv":"'+13125550001':82 '+13125550002':84 '/actions/disable':644 '/actions/enable':721 '/actions/remove':1048 '/managed_accounts':231,313,457,525,642,719,798 '/managed_accounts/allocatable_global_outbound_channels':416 '/organizations/users':846,990,1046 '/organizations/users/users_groups_report':941 '/update_global_channel_limit':800 '1':120 '1000':128 '401':68,153 '403':157 '404':160 '41d4':467,542,653,735,813,1000,1057 '422':64,141,164 '429':61,105,170 '446655440000':469,544,655,737,815,1002,1059 '550e8400':464,539,650,732,810,997,1054 'a716':468,543,654,736,814,1001,1058 'abl':632 'account':3,7,202,210,229,259,265,275,286,291,311,321,365,371,381,413,431,447,455,492,498,508,518,523,529,567,573,583,593,597,622,678,684,694,704,708,760,766,776,796,827 'action':1051 'action.data':1061 'affect':619 'alloc':442,791 'allocat':391,402,425,787 'allow':260,322,366,432,493,530,568,679,761 'alreadi':44 'alway':69,919 'amount':785 'api':28,52,135,155,248,346,349,352,473,476,479,548,551,554,659,662,665,741,744,747 'apikey':25 'approv':221,302 'array':869,956,1012,1069 'assum':41 'authent':66,295 'auto':185 'auto-pagin':184 'automat':200,233,848 'await':79,121,190,240,334,420,462,537,648,730,808,855,945,995,1052 'backoff':113,176 'balanc':355,482,557,668,750 'bash':11 'becom':227,308 'bill':277,329,383,510,585,696,778 'block':892,979,1035,1092 'boolean':263,278,325,330,369,384,435,496,511,533,571,586,682,697,726,764,779,883,970,1026,1083 'busi':315,336 'bypass':881,968,1024,1081 'call':53,609,615 'cat':340 'catch':87 'channel':394,405,428,441,790,802,819 'check':96,145,167 'client':22,42 'client.managedaccounts.actions.disable':649 'client.managedaccounts.actions.enable':731 'client.managedaccounts.create':335 'client.managedaccounts.getallocatableglobaloutboundchannels':421 'client.managedaccounts.list':244 'client.managedaccounts.retrieve':463 'client.managedaccounts.update':538 'client.managedaccounts.updateglobalchannellimit':809 'client.messages.send':80 'client.organizations.users.actions.remove':1053 'client.organizations.users.getgroupsreport':946 'client.organizations.users.list':859 'client.organizations.users.retrieve':996 'code':74,152 'common':150 'connect':97,725 'console.error':93,134,142 'console.log':245,343,422,470,545,656,738,816,860,947,1003,1060 'const':21,77,114,191,241,332,418,460,535,646,728,806,856,943,993,1050 'content':937 'content-typ':936 'control':639 'creat':251,282,287,357,484,559,670,752,863,950,1006,1063 'csv':931 'current':206,214,397,408 'custom':261,323,367,433,494,531,569,680,762 'default':33 'delet':1036,1039 'detail':450 'disabl':590,594,891,978,1034,1091 'display':388,399 'e29b':466,541,652,734,812,999,1056 'e29b-41d4-a716':465,540,651,733,811,998,1055 'els':100,129 'email':254,255,318,360,361,487,488,562,563,673,674,755,756,822,866,867,953,954,1009,1010,1066,1067 'enabl':701,705,890,977,1033,1090 'endpoint':912 'enum':273,379,506,581,692,774,889,976,1032,1089 'err':88,90,102,131 'err.headers':116 'err.message':138 'err.status':137,140 'error':49,58,63,67,71,95,136,144,151,166 'exampl':39 'explict':220,301 'exponenti':112,175 'fail':55 'fetch':234,849 'field':147,168 'food':341 'forbid':598 'format':149,169,932 'found':163 'get':230,415,456,845,893,940,980,989 'global':392,403,426,440,788 'group':868,896,909,921,955,1011,1068 'handl':50,70 'header':939 'hello':86 'id':256,266,362,372,458,489,499,526,564,574,643,675,685,720,757,767,799,824,828,871,958,991,1014,1047,1071 'import':17,177 'inc':342 'includ':604,920 'inform':389,400,922 'initi':45 'instal':10,13 'instanceof':91,103,132 'insuffici':158 'integ':429,443,804,821 'invalid':154 'item':192 'iter':187,196 'javascript':5,9,16,75,232,331,417,459,534,645,727,805,847,942,992,1049 'json':929 'key':29,156,347,474,549,660,742 'larri':338 'last':873,960,1016,1073 'limit':60,107,172,803,820 'list':180,201,208,833,838 'log':634 'longer':630 'manag':4,8,203,211,228,258,264,274,285,290,310,320,364,370,380,414,430,446,454,491,497,507,517,522,528,566,572,582,592,596,621,677,683,693,703,707,759,765,775,795,826 'managedaccount':333,461,536 'managedaccount.data':344,471,546 'managedaccountlistrespons':242 'managedaccountlistresponse.id':246 'membership':910 'messag':612 'method':181 'mission':638 'name':269,316,337,375,502,577,688,770 'need':217,238,298,853 'network':57,94 'new':23,122,284,289 'note':178 'npm':12 'null':878,965,1021,1078 'object':356,483,558,669,751,870,957,1013,1070 'omit':37 'ongo':613 'option':317,527,722,801 'order':225,306 'organ':268,374,501,576,687,769,834,844,879,894,906,966,981,988,1022,1037,1044,1079 'organizationus':857 'organizationuser.id':861 'outbound':393,404,427,789 'own':292 'page':199,236,851 'pagin':179,186,917 'password':326 'patch':524,797 'permiss':159 'phone':608,614 'portal':640 'post':312,641,718,1045 'price':262,324,368,434,495,532,570,681,763 'process.env':26 'product':73 'promis':123 'r':124,126 'rate':59,106,171 'receiv':607 'record':271,377,436,504,579,690,772,830,884,971,1027,1084 'reenabl':723 'report':897,900,924 'requir':146,314 'resourc':161 'respons':419,647,729,807,944 'response.data':423,657,739,817,948 'result':78,194 'retri':99,110,118,173 'retriev':444,448,927 'retry-aft':117 'retryaft':115,127 'return':182,247,345,424,472,547,658,740,818,836,862,898,913,949,983,1005,1062 'rollup':276,328,382,509,584,695,777 'send':605,934 'servic':603,717 'settimeout':125 'setup':15 'shown':47 'sign':874,961,1017,1074 'singl':453,521 'skill' 'skill-telnyx-account-management-javascript' 'sms':611 'source-team-telnyx' 'specif':794,935 'sso':882,969,1025,1082 'status':888,975,1031,1088 'string':250,253,267,270,281,319,327,348,351,354,359,373,376,387,438,475,478,481,486,500,503,514,550,553,556,561,575,578,589,661,664,667,672,686,689,700,743,746,749,754,768,771,782,823,825,829,832,865,872,877,886,952,959,964,973,1008,1015,1020,1029,1065,1072,1077,1086 'sub':626,712 'sub-us':625,711 'telnyx':2,6,14,18,20,24,27,223,304,602,716 'telnyx-account-management-javascript':1 'telnyx.apiconnectionerror':92 'telnyx.apierror':133 'telnyx.ratelimiterror':104 'text':85 'token':350,477,552,663,745 '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':439 'tri':76 'type':272,378,437,505,580,691,773,831,885,938,972,1028,1085 'updat':279,385,512,515,519,587,698,780,783 'usabl':411 'use':188,601,715 'user':207,215,216,249,296,353,398,409,480,555,627,666,713,748,835,841,880,887,895,903,915,967,974,982,985,994,1023,1030,1038,1041,1080,1087 'user.data':1004 'uuid':257,363,490,565,676,758 'valid':62,143,165 'via':636 'wait':108 'without':916","prices":[{"id":"7ec2c7aa-57e7-4e1f-ac8c-333ff5897a8f","listingId":"cfec827a-34ac-443a-8a07-983f87a99ae7","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:58.951Z"}],"sources":[{"listingId":"cfec827a-34ac-443a-8a07-983f87a99ae7","source":"github","sourceId":"team-telnyx/ai/telnyx-account-management-javascript","sourceUrl":"https://github.com/team-telnyx/ai/tree/main/skills/telnyx-account-management-javascript","isPrimary":false,"firstSeenAt":"2026-04-18T22:05:58.951Z","lastSeenAt":"2026-04-22T12:54:41.088Z"}],"details":{"listingId":"cfec827a-34ac-443a-8a07-983f87a99ae7","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"team-telnyx","slug":"telnyx-account-management-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":"c151f556bbdbb0eae294cac383a3b1c800ca1fc3","skill_md_path":"skills/telnyx-account-management-javascript/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/team-telnyx/ai/tree/main/skills/telnyx-account-management-javascript"},"layout":"multi","source":"github","category":"ai","frontmatter":{"name":"telnyx-account-management-javascript","description":">-"},"skills_sh_url":"https://skills.sh/team-telnyx/ai/telnyx-account-management-javascript"},"updatedAt":"2026-04-22T12:54:41.088Z"}}