Creating short links from JavaScript application

Short links can be created by using:

How to create short links by using JavaScript

  • Click "Create API key".
  • Add a Public key.

2) Use the script below.

📘

Remember to paste appropriate values to the following objects: "domain" and "authorization".

var data = {
    "domain":"YOUR_DOMAIN",
    "originalURL": document.getElementById(ID).value
    }; 
 fetch('https://api.short.io/links/public', {
    method: 'post',
    headers: {
      'accept': 'application/json',
      'Content-Type': 'application/json',
      'authorization': 'PUBLIC_API_KEY'
    },
    body: JSON.stringify(data)
  }).then(function(response){ 
     return response.json();
    }).then(function(data){
    alert(data.shortURL)
    })
 }

3) JSON Response (a new link is created).

Most important parameter here is the "shortURL" (the URL of the newly-created short link).

{
  "id":271395962,
  "originalURL":"https://your-long-url.com",
  "DomainId":9026,
  "archived":false,
  "path":"LwM61L",
  "source":"public",
  "redirectType":null,
  "createdAt":"2020-04-02T11:41:21.589Z",
  "OwnerId":9346,
  "updatedAt":"2020-04-02T11:41:21.589Z",
  "secureShortURL":"https://example.com/LwM61L",
  "shortURL":"https://example.com/LwM61L",
  "duplicate":false
}

4) Here's how the script and HTML are operating:

5) Use this code to reproduce the above behavior.

<html>
  <head>
    <link>
  </head>
  <body>
    <h1 class="message">Shorten your first link!</h1>
      <div>
          <input name="text" type="url" value  id="linkinput" placeholder="Paste a URL to shorten" >
          <input type="submit" id="myinput" value="Shorten">
      </div>
    <p id="message"></p>
 <script>
document.getElementById("myinput").onclick = function() {
  var link = document.getElementById("linkinput").value;
  var data = {
    "domain":"YOUR_DOMAIN",
    "originalURL": link,
    "allowDuplicates":false }; 
 fetch('https://api.short.cm/links/public', {
    method: 'post',
    headers: {
      'accept': 'application/json',
      'Content-Type': 'application/json',
      'authorization': 'API_KEY'
    },
    body: JSON.stringify(data)
  }) .then(function(response) {
        return response.json();
    }) 
    .then(function(data){ 
    document.getElementById("message").innerHTML = "Your short link is " + data.shortURL })
    document.getElementById("linkinput").value='';
 }
    </script>
  </body>
</html>

Down below, you can find a video tutorial on creating a public link shortener:

(Video courtesy of Ryder Cragie)


\n \n\n```\n\nDown below, you can find a video tutorial on creating a public link shortener:\n\n\n[block:embed]\n{\n \"html\": \"\",\n \"url\": \"https://www.youtube.com/watch?v=h3YtyP9zlUQ&feature=youtu.be\",\n \"title\": \"How to Create a Public Link Shortener Using the Short.io API\",\n \"favicon\": \"https://www.youtube.com/s/desktop/cafdf09f/img/favicon.ico\",\n \"image\": \"https://i.ytimg.com/vi/h3YtyP9zlUQ/hqdefault.jpg\",\n \"provider\": \"youtube.com\",\n \"href\": \"https://www.youtube.com/watch?v=h3YtyP9zlUQ&feature=youtu.be\"\n}\n[/block]\n\n\n(Video courtesy of Ryder Cragie)","opts":{"alwaysThrow":false,"compatibilityMode":false,"copyButtons":true,"correctnewlines":false,"markdownOptions":{"fences":true,"commonmark":true,"gfm":true,"ruleSpaces":false,"listItemIndent":"1","spacedTable":true,"paddedTable":true},"normalize":true,"lazyImages":true,"reusableContent":{},"safeMode":false,"settings":{"position":false},"theme":"light"},"terms":[],"variables":{"user":{},"defaults":[{"source":"security","_id":"62f40908c308b700ab3bbecf","name":"Authorization","type":"apiKey","apiSetting":"5dc2f9658c10b60180cf5d2c"},{"source":"","_id":"643fd49194ebbf002750a9d3","name":"secret_key","default":"YOUR_SECRET_KEY"},{"source":"","_id":"5da0e89410af660035c8e1c3","name":"domain_name","default":"example.com"}]},"dehydrated":{"toc":"","body":"

Short links can be created by using:

\n\n

How to create short links by using JavaScript

\n

\n\n

\"\"

\n

2) Use the script below.

\n

📘

Remember to paste appropriate values to the following objects: "domain" and "authorization".

\n
var data = {\n    "domain":"YOUR_DOMAIN",\n    "originalURL": document.getElementById(ID).value\n    }; \n fetch('https://api.short.io/links/public', {\n    method: 'post',\n    headers: {\n      'accept': 'application/json',\n      'Content-Type': 'application/json',\n      'authorization': 'PUBLIC_API_KEY'\n    },\n    body: JSON.stringify(data)\n  }).then(function(response){ \n     return response.json();\n    }).then(function(data){\n    alert(data.shortURL)\n    })\n }\n
\n

3) JSON Response (a new link is created).

\n

Most important parameter here is the "shortURL" (the URL of the newly-created short link).

\n
{\n  "id":271395962,\n  "originalURL":"https://your-long-url.com",\n  "DomainId":9026,\n  "archived":false,\n  "path":"LwM61L",\n  "source":"public",\n  "redirectType":null,\n  "createdAt":"2020-04-02T11:41:21.589Z",\n  "OwnerId":9346,\n  "updatedAt":"2020-04-02T11:41:21.589Z",\n  "secureShortURL":"https://example.com/LwM61L",\n  "shortURL":"https://example.com/LwM61L",\n  "duplicate":false\n}\n
\n

4) Here's how the script and HTML are operating:

\n

\"\"

\n

5) Use this code to reproduce the above behavior.

\n
<html>\n  <head>\n    <link>\n  </head>\n  <body>\n    <h1 class="message">Shorten your first link!</h1>\n      <div>\n          <input name="text" type="url" value  id="linkinput" placeholder="Paste a URL to shorten" >\n          <input type="submit" id="myinput" value="Shorten">\n      </div>\n    <p id="message"></p>\n <script>\ndocument.getElementById("myinput").onclick = function() {\n  var link = document.getElementById("linkinput").value;\n  var data = {\n    "domain":"YOUR_DOMAIN",\n    "originalURL": link,\n    "allowDuplicates":false }; \n fetch('https://api.short.cm/links/public', {\n    method: 'post',\n    headers: {\n      'accept': 'application/json',\n      'Content-Type': 'application/json',\n      'authorization': 'API_KEY'\n    },\n    body: JSON.stringify(data)\n  }) .then(function(response) {\n        return response.json();\n    }) \n    .then(function(data){ \n    document.getElementById("message").innerHTML = "Your short link is " + data.shortURL })\n    document.getElementById("linkinput").value='';\n }\n    </script>\n  </body>\n</html>\n
\n

Down below, you can find a video tutorial on creating a public link shortener:

\n
\n

(Video courtesy of Ryder Cragie)

"}},"doc":{"metadata":{"image":[],"title":"","description":""},"api":{"method":"get","url":"","auth":"required","results":{"codes":[{"name":"","code":"{}","language":"json","status":200},{"name":"","code":"{}","language":"json","status":400}]},"params":[]},"next":{"description":"","pages":[]},"algolia":{"recordCount":7,"publishPending":false,"updatedAt":"2023-06-06T19:04:18.449Z"},"title":"Creating short links from JavaScript application","icon":"","updates":["63150d0053811f00313a11e2"],"type":"basic","slug":"creating-short-links-from-javascript","excerpt":"","body":"Short links can be created by using:\n\n- a POST HTTP request to , with JSON body;\n\n## How to create short links by using JavaScript\n\n### **1) **Get your **public** API key here: \n\n- Click \"Create API key\".\n- Add a **Public** key.\n\n![](https://files.readme.io/149a219-Screen_Shot_2021-08-11_at_2.43.37_PM.png \"Screen Shot 2021-08-11 at 2.43.37 PM.png\")\n\n### **2)** Use the script below.\n\n> 📘 \n> \n> Remember to paste appropriate values to the following objects: **\"domain\" and \"authorization\".**\n\n```javascript JavaScript\nvar data = {\n \"domain\":\"YOUR_DOMAIN\",\n \"originalURL\": document.getElementById(ID).value\n }; \n fetch('https://api.short.io/links/public', {\n method: 'post',\n headers: {\n 'accept': 'application/json',\n 'Content-Type': 'application/json',\n 'authorization': 'PUBLIC_API_KEY'\n },\n body: JSON.stringify(data)\n }).then(function(response){ \n return response.json();\n }).then(function(data){\n alert(data.shortURL)\n })\n }\n```\n\n### **3) **JSON Response (a new link is created).\n\nMost important parameter here is the \"shortURL\" (the URL of the newly-created short link).\n\n```json JSON Response\n{\n \"id\":271395962,\n \"originalURL\":\"https://your-long-url.com\",\n \"DomainId\":9026,\n \"archived\":false,\n \"path\":\"LwM61L\",\n \"source\":\"public\",\n \"redirectType\":null,\n \"createdAt\":\"2020-04-02T11:41:21.589Z\",\n \"OwnerId\":9346,\n \"updatedAt\":\"2020-04-02T11:41:21.589Z\",\n \"secureShortURL\":\"https://example.com/LwM61L\",\n \"shortURL\":\"https://example.com/LwM61L\",\n \"duplicate\":false\n}\n```\n\n### **4) **Here's how the script and HTML are operating:\n\n![](https://files.readme.io/8464c6d-123.gif \"123.gif\")\n\n### **5)** Use this code to reproduce the above behavior.\n\n```html HTML + JavaScript\n\n \n \n \n \n

Shorten your first link!

\n
\n \n \n
\n

\n \n \n\n```\n\nDown below, you can find a video tutorial on creating a public link shortener:\n\n\n[block:embed]\n{\n \"html\": \"\",\n \"url\": \"https://www.youtube.com/watch?v=h3YtyP9zlUQ&feature=youtu.be\",\n \"title\": \"How to Create a Public Link Shortener Using the Short.io API\",\n \"favicon\": \"https://www.youtube.com/s/desktop/cafdf09f/img/favicon.ico\",\n \"image\": \"https://i.ytimg.com/vi/h3YtyP9zlUQ/hqdefault.jpg\",\n \"provider\": \"youtube.com\",\n \"href\": \"https://www.youtube.com/watch?v=h3YtyP9zlUQ&feature=youtu.be\"\n}\n[/block]\n\n\n(Video courtesy of Ryder Cragie)","order":2,"isReference":false,"deprecated":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"previousSlug":"","slugUpdatedAt":"2020-08-13T01:19:36.304Z","revision":4,"_id":"636a795e4594140010b7efa8","pendingAlgoliaPublish":false,"createdAt":"2020-05-28T04:48:17.212Z","updatedAt":"2023-06-06T19:04:18.105Z","user":"6064d0400a4d91020a10c718","category":"636a795e4594140010b7ef6d","project":"5d9c67389dd8cd00509340d9","version":"636a795e4594140010b7efce","__v":1,"parentDoc":null,"isApi":false,"id":"636a795e4594140010b7efa8"},"hideTOC":false,"meta":{"slug":"creating-short-links-from-javascript","type":"docs","parent":null,"image":[],"title":"Creating short links from JavaScript application","title_seo":"Creating short links from JavaScript application","description":"Short links can be created by using: a POST HTTP request to https://api.short.io/links/public, with JSON body; How to create short links by using JavaScript1) Get your public API key here: https://app.short.io/settings/integrations/api-key Click \"Create API key\".Add a Public key. 2) Use the script b...","_id":"636a795e4594140010b7efa8","hidden":false},"slugUrl":"/docs/creating-short-links-from-javascript","config":{"algoliaIndex":"readme_search_v2","amplitude":"dc8065a65ef83d6ad23e37aaf014fc84","asset_url":"https://cdn.readme.io","domain":"readme.io","domainFull":"https://dash.readme.com","fullstory":{"enabled":true},"metrics":{"dashUrl":"https://m.readme.io","defaultUrl":"https://metrics.readme.io","exportMaxRetries":12,"wsUrl":"wss://m.readme.io"},"releaseVersion":"4.495.0","sentry":{"dsn":"https://[email protected]/2052166","enabled":true,"tracesSampleRate":0},"sslGenerationService":"ssl.readmessl.com"},"context":{"labs":{},"user":{},"terms":[],"variables":{"user":{},"defaults":[{"source":"security","_id":"62f40908c308b700ab3bbecf","name":"Authorization","type":"apiKey","apiSetting":"5dc2f9658c10b60180cf5d2c"},{"source":"","_id":"643fd49194ebbf002750a9d3","name":"secret_key","default":"YOUR_SECRET_KEY"},{"source":"","_id":"5da0e89410af660035c8e1c3","name":"domain_name","default":"example.com"}]},"project":{"_id":"5d9c67389dd8cd00509340d9","appearance":{"nextStepsLabel":"","hideTableOfContents":false,"showVersion":true,"html_hidelinks":false,"global_landing_page":{"redirect":"","html":""},"html_footer_meta":"","html_head":"","html_footer":"","html_body":"","html_promo":"","javascript_hub2":"","javascript":"","stylesheet_hub2":"","stylesheet":"","favicon":["https://files.readme.io/fb539c9-small-shortcm-logo.png","shortcm-logo.png",32,32,"#79b4a8","https://files.readme.io/ebbfb75-shortcm-logo.png"],"logo_white_use":false,"logo_white":[],"logo":["https://files.readme.io/d45c977-small-logo-square.png","logo-square.png",80,80,"#79b4a8","https://files.readme.io/0e2b796-logo-square.png"],"promos":[{"extras":{"type":"buttons","buttonPrimary":"get-started","buttonSecondary":"reference"},"title":"The Short.io Developer Hub","text":"Welcome to the Short.io developer hub. You'll find comprehensive guides and documentation to help you start working with Short.io as quickly as possible, as well as support if you get stuck. Let's jump right in!","_id":"5d9c67389dd8cd00509340da"}],"body":{"style":"none"},"header":{"img_pos":"tl","img_size":"auto","img":[],"style":"solid"},"typography":{"tk_body":"","tk_headline":"","tk_key":"","typekit":false,"body":"Open+Sans:400:sans-serif","headline":"Open+Sans:400:sans-serif"},"colors":{"body_highlight":"#1bb584","header_text":"","main_alt":"","main":"#1bb584","highlight":"","custom_login_link_color":""},"main_body":{"type":"links"},"splitReferenceDocs":false,"childrenAsPills":false,"hide_logo":false,"sticky":false,"landing":true,"overlay":"triangles","theme":"line","link_logo_to_url":true,"referenceLayout":"column","rdmd":{"callouts":{"useIconFont":false},"theme":{"background":"","border":"","markdownEdge":"","markdownFont":"","markdownFontSize":"","markdownLineHeight":"","markdownRadius":"","markdownText":"","markdownTitle":"","markdownTitleFont":"","mdCodeBackground":"","mdCodeFont":"","mdCodeRadius":"","mdCodeTabs":"","mdCodeText":"","tableEdges":"","tableHead":"","tableHeadText":"","tableRow":"","tableStripe":"","tableText":"","text":"","title":""}},"subheaderStyle":"dropdown","showMetricsInReference":true,"referenceSimpleMode":false,"stylesheet_hub3":"","loginLogo":[],"logo_large":false,"colorScheme":"auto"},"custom_domain":"developers.short.io","childrenProjects":[],"description":"Short link API allows you to create and manage short links on your branded domain","error404":"","experiments":[],"first_page":"landing","flags":{"translation":false,"directGoogleToStableVersion":false,"disableAnonForum":false,"newApiExplorer":true,"newEditor":true,"hideGoogleAnalytics":false,"cookieAuthentication":false,"allowXFrame":false,"speedyRender":false,"correctnewlines":false,"swagger":false,"oauth":false,"migrationSwaggerRun":false,"migrationRun":false,"hub2":true,"enterprise":false,"allow_hub2":false,"alwaysShowDocPublishStatus":false,"newMarkdownBetaProgram":false,"oldMarkdown":false,"newSearch":true,"allowApiExplorerJsonEditor":false,"rdmdCompatibilityMode":false,"staging":false,"tutorials":true,"useReactApp":true,"newHeader":false,"referenceRedesign":false,"auth0Oauth":false,"graphql":false,"singleProjectEnterprise":false,"dashReact":false,"allowReferenceUpgrade":true,"metricsV2":true,"newEditorDash":true,"enableRealtimeExperiences":false,"reviewWorkflow":true,"star":false,"allowDarkMode":false,"forceDarkMode":false,"useReactGLP":false,"disablePasswordlessLogin":false,"personalizedDocs":false,"myDevelopers":false,"superHub":false,"developerDashboard":false,"allowReusableOTPs":false,"dashHomeRefresh":false,"owlbotAi":false,"apiV2":false,"git":{"read":false,"write":false},"superHubBeta":false,"dashQuickstart":false,"disableAutoTranslate":false,"customBlocks":false,"devDashHub":false,"disableSAMLScoping":false},"fullBaseUrl":"https://developers.short.io/","glossaryTerms":[],"graphqlSchema":"","hasOneChild":false,"healthCheck":{"provider":"","settings":{}},"intercom_secure_emailonly":false,"intercom":"rmf95u7h","is_active":true,"internal":"","landing_bottom":[],"metrics":{"thumbsEnabled":false,"enabled":false,"monthlyLimit":0,"planLimit":1000000,"realtime":{"dashEnabled":false,"hubEnabled":false}},"modules":{"logs":false,"suggested_edits":true,"discuss":false,"changelog":true,"reference":true,"examples":true,"docs":true,"landing":true,"custompages":false,"tutorials":false,"graphql":false},"name":"Short.io","nav_names":{"discuss":"","changelog":"","reference":"","docs":"","tutorials":"","recipes":""},"oauth_url":"https://app.short.io/settings/readme-login","onboardingCompleted":{"documentation":true,"appearance":true,"jwt":true,"api":false,"logs":true,"domain":true,"metricsSDK":false},"owlbot":{"enabled":false,"isPaying":false},"owner":"5b75399436c0cd0003563cb6","plan":"startup2018","planOverride":"","planTrial":"startup2018","readmeScore":{"components":{"newDesign":{"enabled":true,"points":25},"reference":{"enabled":true,"points":50},"tryItNow":{"enabled":true,"points":35},"syncingOAS":{"enabled":true,"points":10},"customLogin":{"enabled":true,"points":25},"metrics":{"enabled":false,"points":40},"recipes":{"enabled":false,"points":15},"pageVoting":{"enabled":false,"points":1},"suggestedEdits":{"enabled":true,"points":10},"support":{"enabled":true,"points":5},"htmlLanding":{"enabled":false,"points":5},"guides":{"enabled":true,"points":10},"changelog":{"enabled":true,"points":5},"glossary":{"enabled":false,"points":1},"variables":{"enabled":true,"points":1},"integrations":{"enabled":true,"points":2}},"percentScore":62.5,"totalScore":178},"reCaptchaSiteKey":"6Ld0EWEUAAAAAFSnSvsm-azMwTHMbi5kdw1qmEti","reference":{"alwaysUseDefaults":true},"stable":{"_id":"636a795e4594140010b7efce","version":"1.3","version_clean":"1.3.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["636a795e4594140010b7ef6a","5d9c677ef685e700116f7745","5d9c6832f685e700116f775b","5d9c6878a1de1f00618d6f82","5d9c6898cbd708002e19a9f5","5d9c68f593fc5d0021d51369","5d9c6906d3f2cc002bde19f7","5d9c70a678df4a0020973bb7","5d9c71dabe86f3001c152835","5d9e0ddb34bb360018fd9cec","5d9f1d50306a4c00561f3bb6","5d9f2572135a2d0042742a82","5d9f2618306a4c00561f3c89","5d9f263e47b97f0018f57756","5d9f267837f042004c1f5c57","5d9f27392f7c9e006ca91778","5d9f2783306a4c00561f3ca4","5d9f27d137f042004c1f5c81","5d9f28522f7c9e006ca91797","5d9f288de390b80039d59149","5d9f294770fcd000350c16f3","5d9f2959cfcae000110b095b","636a795e4594140010b7ef6b","5d9f2f4bcfcae000110b09d7","5d9f7452c824980024a96423","5d9f75984a94050066c61c61","636a795e4594140010b7ef6c","5da34c0055edb4001f23a339","5dac63f8e59ca60069999bae","6376bf29127d99000316f7a0"],"project":"5d9c67389dd8cd00509340d9","__v":0,"forked_from":"5dc2f9658c10b60180cf5d2e","createdAt":"2019-10-08T10:38:48.183Z","releaseDate":"2019-10-08T10:38:48.183Z"},"subdomain":"shortcm","subpath":"","topnav":{"edited":true,"right":[{"type":"user","text":"User","url":"/login?redirect_uri=/docs/creating-short-links-from-javascript"}],"left":[{"type":"docs","text":"Guides"},{"type":"discuss"},{"type":"reference","text":"API Reference"}],"bottom":[]},"translate":{"languages":[],"project_name":"","org_name":"","key_secret":"","key_public":"","show_widget":false,"provider":"transifex"},"url":"https://short.io","versions":[{"_id":"5d9c67389dd8cd00509340dd","project":"5d9c67389dd8cd00509340d9","createdAt":"2019-10-08T10:38:48.183Z","releaseDate":"2019-10-08T10:38:48.183Z","categories":["5d9c67389dd8cd00509340de","5d9c677ef685e700116f7745","5d9c6832f685e700116f775b","5d9c6878a1de1f00618d6f82","5d9c6898cbd708002e19a9f5","5d9c68f593fc5d0021d51369","5d9c6906d3f2cc002bde19f7","5d9c70a678df4a0020973bb7","5d9c71dabe86f3001c152835","5d9e0ddb34bb360018fd9cec","5d9f1d50306a4c00561f3bb6","5d9f2572135a2d0042742a82","5d9f2618306a4c00561f3c89","5d9f263e47b97f0018f57756","5d9f267837f042004c1f5c57","5d9f27392f7c9e006ca91778","5d9f2783306a4c00561f3ca4","5d9f27d137f042004c1f5c81","5d9f28522f7c9e006ca91797","5d9f288de390b80039d59149","5d9f294770fcd000350c16f3","5d9f2959cfcae000110b095b","5d9f2e0f0fd7130025d2747d","5d9f2f4bcfcae000110b09d7","5d9f7452c824980024a96423","5d9f75984a94050066c61c61","5d9f76d74a94050066c61c82","6376bf29127d99000316f7a4"],"is_deprecated":true,"is_hidden":true,"is_beta":false,"is_stable":false,"codename":"","version_clean":"1.0.0","version":"1.0","__v":27},{"_id":"5da0880fddf67900544643e9","project":"5d9c67389dd8cd00509340d9","__v":0,"forked_from":"5d9c67389dd8cd00509340dd","createdAt":"2019-10-08T10:38:48.183Z","releaseDate":"2019-10-08T10:38:48.183Z","categories":["5da0880fddf67900544643c4","5d9c677ef685e700116f7745","5d9c6832f685e700116f775b","5d9c6878a1de1f00618d6f82","5d9c6898cbd708002e19a9f5","5d9c68f593fc5d0021d51369","5d9c6906d3f2cc002bde19f7","5d9c70a678df4a0020973bb7","5d9c71dabe86f3001c152835","5d9e0ddb34bb360018fd9cec","5d9f1d50306a4c00561f3bb6","5d9f2572135a2d0042742a82","5d9f2618306a4c00561f3c89","5d9f263e47b97f0018f57756","5d9f267837f042004c1f5c57","5d9f27392f7c9e006ca91778","5d9f2783306a4c00561f3ca4","5d9f27d137f042004c1f5c81","5d9f28522f7c9e006ca91797","5d9f288de390b80039d59149","5d9f294770fcd000350c16f3","5d9f2959cfcae000110b095b","5da0880fddf67900544643c5","5d9f2f4bcfcae000110b09d7","5d9f7452c824980024a96423","5d9f75984a94050066c61c61","5da0880fddf67900544643c6","6376bf29127d99000316f7a3"],"is_deprecated":true,"is_hidden":true,"is_beta":false,"is_stable":false,"codename":"","version_clean":"1.0.1","version":"1.0.1"},{"_id":"5da347e0b58b9c00198ce3b2","project":"5d9c67389dd8cd00509340d9","__v":2,"forked_from":"5da0880fddf67900544643e9","createdAt":"2019-10-08T10:38:48.183Z","releaseDate":"2019-10-08T10:38:48.183Z","categories":["5da347e0b58b9c00198ce38b","5d9c677ef685e700116f7745","5d9c6832f685e700116f775b","5d9c6878a1de1f00618d6f82","5d9c6898cbd708002e19a9f5","5d9c68f593fc5d0021d51369","5d9c6906d3f2cc002bde19f7","5d9c70a678df4a0020973bb7","5d9c71dabe86f3001c152835","5d9e0ddb34bb360018fd9cec","5d9f1d50306a4c00561f3bb6","5d9f2572135a2d0042742a82","5d9f2618306a4c00561f3c89","5d9f263e47b97f0018f57756","5d9f267837f042004c1f5c57","5d9f27392f7c9e006ca91778","5d9f2783306a4c00561f3ca4","5d9f27d137f042004c1f5c81","5d9f28522f7c9e006ca91797","5d9f288de390b80039d59149","5d9f294770fcd000350c16f3","5d9f2959cfcae000110b095b","5da347e0b58b9c00198ce38c","5d9f2f4bcfcae000110b09d7","5d9f7452c824980024a96423","5d9f75984a94050066c61c61","5da347e0b58b9c00198ce38d","5da34c0055edb4001f23a339","5dac63f8e59ca60069999bae","6376bf29127d99000316f7a1"],"is_deprecated":true,"is_hidden":true,"is_beta":false,"is_stable":false,"codename":"","version_clean":"1.1.0","version":"1.1"},{"_id":"5dc2f9658c10b60180cf5d2e","project":"5d9c67389dd8cd00509340d9","__v":8,"forked_from":"5da347e0b58b9c00198ce3b2","createdAt":"2019-10-08T10:38:48.183Z","releaseDate":"2019-10-08T10:38:48.183Z","categories":["5dc2f9658c10b60180cf5d08","5d9c677ef685e700116f7745","5d9c6832f685e700116f775b","5d9c6878a1de1f00618d6f82","5d9c6898cbd708002e19a9f5","5d9c68f593fc5d0021d51369","5d9c6906d3f2cc002bde19f7","5d9c70a678df4a0020973bb7","5d9c71dabe86f3001c152835","5d9e0ddb34bb360018fd9cec","5d9f1d50306a4c00561f3bb6","5d9f2572135a2d0042742a82","5d9f2618306a4c00561f3c89","5d9f263e47b97f0018f57756","5d9f267837f042004c1f5c57","5d9f27392f7c9e006ca91778","5d9f2783306a4c00561f3ca4","5d9f27d137f042004c1f5c81","5d9f28522f7c9e006ca91797","5d9f288de390b80039d59149","5d9f294770fcd000350c16f3","5d9f2959cfcae000110b095b","5dc2f9658c10b60180cf5d09","5d9f2f4bcfcae000110b09d7","5d9f7452c824980024a96423","5d9f75984a94050066c61c61","5dc2f9658c10b60180cf5d0a","5da34c0055edb4001f23a339","5dac63f8e59ca60069999bae","6376bf29127d99000316f7a2"],"is_deprecated":true,"is_hidden":false,"is_beta":false,"is_stable":false,"codename":"","version_clean":"1.2.0","version":"1.2"},{"_id":"636a795e4594140010b7efce","version":"1.3","version_clean":"1.3.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["636a795e4594140010b7ef6a","5d9c677ef685e700116f7745","5d9c6832f685e700116f775b","5d9c6878a1de1f00618d6f82","5d9c6898cbd708002e19a9f5","5d9c68f593fc5d0021d51369","5d9c6906d3f2cc002bde19f7","5d9c70a678df4a0020973bb7","5d9c71dabe86f3001c152835","5d9e0ddb34bb360018fd9cec","5d9f1d50306a4c00561f3bb6","5d9f2572135a2d0042742a82","5d9f2618306a4c00561f3c89","5d9f263e47b97f0018f57756","5d9f267837f042004c1f5c57","5d9f27392f7c9e006ca91778","5d9f2783306a4c00561f3ca4","5d9f27d137f042004c1f5c81","5d9f28522f7c9e006ca91797","5d9f288de390b80039d59149","5d9f294770fcd000350c16f3","5d9f2959cfcae000110b095b","636a795e4594140010b7ef6b","5d9f2f4bcfcae000110b09d7","5d9f7452c824980024a96423","5d9f75984a94050066c61c61","636a795e4594140010b7ef6c","5da34c0055edb4001f23a339","5dac63f8e59ca60069999bae","6376bf29127d99000316f7a0"],"project":"5d9c67389dd8cd00509340d9","__v":0,"forked_from":"5dc2f9658c10b60180cf5d2e","createdAt":"2019-10-08T10:38:48.183Z","releaseDate":"2019-10-08T10:38:48.183Z"}],"variableDefaults":[{"source":"security","_id":"62f40908c308b700ab3bbecf","name":"Authorization","type":"apiKey","apiSetting":"5dc2f9658c10b60180cf5d2c"},{"source":"","_id":"643fd49194ebbf002750a9d3","name":"secret_key","default":"YOUR_SECRET_KEY"},{"source":"","_id":"5da0e89410af660035c8e1c3","name":"domain_name","default":"example.com"}],"webhookEnabled":false,"isHubEditable":true},"projectStore":{"data":{"allow_crawlers":"disabled","canonical_url":null,"description":"Short link API allows you to create and manage short links on your branded domain","homepage_url":"https://short.io","name":"Short.io","redirects":[],"sitemap":"disabled","subdomain":"shortcm","suggested_edits":"enabled","uri":"/projects/me","custom_login":{"login_url":"https://app.short.io/settings/readme-login","logout_url":null},"pages":{"not_found":null},"privacy":{"view":"public","password":null},"reference":{"defaults":"always_use"},"health_check":{"provider":"none","settings":{"manual":{"status":"down","url":null},"statuspage":{"id":null}}},"integrations":{"bing":{"verify":null},"google":{"analytics":null,"site_verification":null},"heap":{"id":null},"koala":{"key":null},"localize":{"key":null},"recaptcha":{"site_key":"6Ld0EWEUAAAAAFSnSvsm-azMwTHMbi5kdw1qmEti","secret_key":null},"segment":{"key":null,"domain":null},"typekit":{"key":null},"zendesk":{"subdomain":null},"intercom":{"app_id":"rmf95u7h","secure_mode":{"key":null,"email_only":false}}},"permissions":{"appearance":{"private_label":"disabled","custom_code":{"css":"disabled","html":"enabled","js":"disabled"}}},"appearance":{"table_of_contents":"enabled","whats_next_label":null,"brand":{"primary_color":"#1bb584","link_color":"#1bb584","theme":"system"},"footer":{"readme_logo":"show"},"custom_code":{"css":null,"js":null,"html":{"header":null,"home_footer":null,"page_footer":null}},"markdown":{"callouts":{"icon_font":"emojis"}},"logo":{"size":"default","dark_mode":{"uri":null,"url":null,"name":null,"width":null,"height":null,"color":null,"links":{"original_url":null}},"main":{"uri":null,"url":"https://files.readme.io/d45c977-small-logo-square.png","name":"logo-square.png","width":80,"height":80,"color":"#79b4a8","links":{"original_url":"https://files.readme.io/0e2b796-logo-square.png"}},"favicon":{"uri":null,"url":"https://files.readme.io/fb539c9-small-shortcm-logo.png","name":"shortcm-logo.png","width":32,"height":32,"color":"#79b4a8","links":{"original_url":"https://files.readme.io/ebbfb75-shortcm-logo.png"}}},"navigation":{"first_page":"landing_page","left":[{"type":"guides","title":null,"url":null,"custom_page":null},{"type":"discussions","title":null,"url":null,"custom_page":null},{"type":"reference","title":null,"url":null,"custom_page":null}],"logo_link":"homepage","right":[{"type":"user_controls","title":null,"url":null,"custom_page":null}],"sub_nav":[],"subheader_layout":"dropdown","version":"enabled","links":{"home":{"label":"Home","visibility":"enabled"},"graphql":{"label":"GraphQL","visibility":"disabled"},"guides":{"label":"Guides","alias":null,"visibility":"enabled"},"reference":{"label":"API Reference","alias":null,"visibility":"enabled"},"recipes":{"label":"Recipes","alias":null,"visibility":"disabled"},"api_logs":{"label":"API Logs","visibility":"disabled"},"changelog":{"label":"Changelog","alias":null,"visibility":"enabled"},"discussions":{"label":"Discussions","alias":null,"visibility":"disabled"}}},"header":{"type":"line","gradient_color":null,"overlay":{"fill":"auto","type":"triangles","position":"top-left","image":{"uri":null,"url":null,"name":null,"width":null,"height":null,"color":null,"links":{"original_url":null}}}}}}},"version":{"_id":"636a795e4594140010b7efce","version":"1.3","version_clean":"1.3.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["636a795e4594140010b7ef6a","5d9c677ef685e700116f7745","5d9c6832f685e700116f775b","5d9c6878a1de1f00618d6f82","5d9c6898cbd708002e19a9f5","5d9c68f593fc5d0021d51369","5d9c6906d3f2cc002bde19f7","5d9c70a678df4a0020973bb7","5d9c71dabe86f3001c152835","5d9e0ddb34bb360018fd9cec","5d9f1d50306a4c00561f3bb6","5d9f2572135a2d0042742a82","5d9f2618306a4c00561f3c89","5d9f263e47b97f0018f57756","5d9f267837f042004c1f5c57","5d9f27392f7c9e006ca91778","5d9f2783306a4c00561f3ca4","5d9f27d137f042004c1f5c81","5d9f28522f7c9e006ca91797","5d9f288de390b80039d59149","5d9f294770fcd000350c16f3","5d9f2959cfcae000110b095b","636a795e4594140010b7ef6b","5d9f2f4bcfcae000110b09d7","5d9f7452c824980024a96423","5d9f75984a94050066c61c61","636a795e4594140010b7ef6c","5da34c0055edb4001f23a339","5dac63f8e59ca60069999bae","6376bf29127d99000316f7a0"],"project":"5d9c67389dd8cd00509340d9","__v":0,"forked_from":"5dc2f9658c10b60180cf5d2e","createdAt":"2019-10-08T10:38:48.183Z","releaseDate":"2019-10-08T10:38:48.183Z"}},"reqUrl":"/docs/creating-short-links-from-javascript","version":{"_id":"636a795e4594140010b7efce","version":"1.3","version_clean":"1.3.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["636a795e4594140010b7ef6a","5d9c677ef685e700116f7745","5d9c6832f685e700116f775b","5d9c6878a1de1f00618d6f82","5d9c6898cbd708002e19a9f5","5d9c68f593fc5d0021d51369","5d9c6906d3f2cc002bde19f7","5d9c70a678df4a0020973bb7","5d9c71dabe86f3001c152835","5d9e0ddb34bb360018fd9cec","5d9f1d50306a4c00561f3bb6","5d9f2572135a2d0042742a82","5d9f2618306a4c00561f3c89","5d9f263e47b97f0018f57756","5d9f267837f042004c1f5c57","5d9f27392f7c9e006ca91778","5d9f2783306a4c00561f3ca4","5d9f27d137f042004c1f5c81","5d9f28522f7c9e006ca91797","5d9f288de390b80039d59149","5d9f294770fcd000350c16f3","5d9f2959cfcae000110b095b","636a795e4594140010b7ef6b","5d9f2f4bcfcae000110b09d7","5d9f7452c824980024a96423","5d9f75984a94050066c61c61","636a795e4594140010b7ef6c","5da34c0055edb4001f23a339","5dac63f8e59ca60069999bae","6376bf29127d99000316f7a0"],"project":"5d9c67389dd8cd00509340d9","__v":0,"forked_from":"5dc2f9658c10b60180cf5d2e","createdAt":"2019-10-08T10:38:48.183Z","releaseDate":"2019-10-08T10:38:48.183Z"},"lang":"en","langFull":"Default","isDetachedProductionSite":false,"rdmdOpts":{"normalize":true,"correctnewlines":false,"compatibilityMode":false}}">