[{"data":1,"prerenderedAt":275},["ShallowReactive",2],{"navigation-en":3,"\u002Fdocs\u002Fapi-reference\u002F":22},[4,11,18],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Introduction","\u002Fdocs\u002Fgetting-started\u002F","docs\u002F1.getting-started\u002F1.index",[9],{"title":5,"path":6,"stem":7,"icon":10},"i-lucide-house",{"title":12,"path":13,"stem":14,"children":15,"icon":17},"API Reference","\u002Fdocs\u002Fapi-reference\u002F","docs\u002F2.api-reference\u002F1.index",[16],{"title":12,"path":13,"stem":14,"icon":17},"i-lucide-code",{"title":19,"path":20,"icon":21},"API playground","\u002Fdocs\u002Fapi\u002F","i-lucide-square-terminal",{"page":23,"surround":270},{"id":24,"title":12,"body":25,"description":262,"extension":263,"meta":264,"navigation":266,"path":267,"seo":268,"stem":14,"__hash__":269},"docs_en\u002Fdocs\u002F2.api-reference\u002F1.index.md",{"type":26,"value":27,"toc":255},"minimark",[28,32,45,50,57,61,64,100,107,111,118,186,189,193,233,237,251],[29,30,31],"p",{},"Nayalink exposes a fully typed REST API. Everything you can do in the dashboard — create short links, manage campaigns and tags, and read privacy-first click analytics — is available programmatically.",[29,33,34,35,39,40,44],{},"For an interactive reference where you can try requests in the browser, open the ",[36,37,38],"a",{"href":20},"interactive API reference",". The machine-readable contract is the ",[36,41,43],{"href":42},"\u002Fopenapi.json","OpenAPI document",".",[46,47,49],"h2",{"id":48},"base-url","Base URL",[29,51,52,53,44],{},"All endpoints are served from ",[54,55,56],"code",{},"https:\u002F\u002Fapi.nayalink.co",[46,58,60],{"id":59},"authentication","Authentication",[29,62,63],{},"Authenticate with an API key sent as a Bearer token:",[65,66,71],"pre",{"className":67,"code":68,"language":69,"meta":70,"style":70},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","Authorization: Bearer \u003Cyour-api-key>\n","bash","",[54,72,73],{"__ignoreMap":70},[74,75,78,82,86,90,93,97],"span",{"class":76,"line":77},"line",1,[74,79,81],{"class":80},"sBMFI","Authorization:",[74,83,85],{"class":84},"sfazB"," Bearer",[74,87,89],{"class":88},"sMK4o"," \u003C",[74,91,92],{"class":84},"your-api-ke",[74,94,96],{"class":95},"sTEyZ","y",[74,98,99],{"class":88},">\n",[29,101,102,103,44],{},"API keys are available on the Pro and Business plans and can be scoped to specific permissions. Manage them in ",[104,105,106],"strong",{},"Settings → API tokens",[46,108,110],{"id":109},"create-a-short-link","Create a short link",[29,112,113,114,117],{},"Only ",[54,115,116],{},"original_url"," is required:",[65,119,121],{"className":67,"code":120,"language":69,"meta":70,"style":70},"curl -X POST https:\u002F\u002Fapi.nayalink.co\u002Fapi\u002Fv1\u002Flinks \\\n  -H \"Authorization: Bearer \u003Cyour-api-key>\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"original_url\": \"https:\u002F\u002Fexample.com\u002Fvery\u002Flong\u002Furl\"}'\n",[54,122,123,140,157,171],{"__ignoreMap":70},[74,124,125,128,131,134,137],{"class":76,"line":77},[74,126,127],{"class":80},"curl",[74,129,130],{"class":84}," -X",[74,132,133],{"class":84}," POST",[74,135,136],{"class":84}," https:\u002F\u002Fapi.nayalink.co\u002Fapi\u002Fv1\u002Flinks",[74,138,139],{"class":95}," \\\n",[74,141,143,146,149,152,155],{"class":76,"line":142},2,[74,144,145],{"class":84},"  -H",[74,147,148],{"class":88}," \"",[74,150,151],{"class":84},"Authorization: Bearer \u003Cyour-api-key>",[74,153,154],{"class":88},"\"",[74,156,139],{"class":95},[74,158,160,162,164,167,169],{"class":76,"line":159},3,[74,161,145],{"class":84},[74,163,148],{"class":88},[74,165,166],{"class":84},"Content-Type: application\u002Fjson",[74,168,154],{"class":88},[74,170,139],{"class":95},[74,172,174,177,180,183],{"class":76,"line":173},4,[74,175,176],{"class":84},"  -d",[74,178,179],{"class":88}," '",[74,181,182],{"class":84},"{\"original_url\": \"https:\u002F\u002Fexample.com\u002Fvery\u002Flong\u002Furl\"}",[74,184,185],{"class":88},"'\n",[29,187,188],{},"The response contains the generated short code and the full short URL.",[46,190,192],{"id":191},"resources","Resources",[194,195,196,203,209,215,221,227],"ul",{},[197,198,199,202],"li",{},[104,200,201],{},"Links"," — create, update, and manage short links: custom codes, expiration, password protection, and routing rules.",[197,204,205,208],{},[104,206,207],{},"Campaigns"," — group links into campaigns and roll analytics up across them.",[197,210,211,214],{},[104,212,213],{},"Tags"," — organise links with color-coded tags.",[197,216,217,220],{},[104,218,219],{},"Analytics"," — read aggregate, privacy-first click analytics: visits over time, countries, cities, referrers, browsers, operating systems, device types, languages, and UTM parameters. No IP addresses are stored.",[197,222,223,226],{},[104,224,225],{},"API tokens"," — create and revoke scoped API keys.",[197,228,229,232],{},[104,230,231],{},"Profile"," — read and update the authenticated account.",[46,234,236],{"id":235},"next-steps","Next steps",[194,238,239,245],{},[197,240,241,242,44],{},"Try requests interactively in the ",[36,243,244],{"href":20},"API reference",[197,246,247,248,44],{},"New to Nayalink? Start with the ",[36,249,250],{"href":6},"introduction",[252,253,254],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":70,"searchDepth":142,"depth":142,"links":256},[257,258,259,260,261],{"id":48,"depth":142,"text":49},{"id":59,"depth":142,"text":60},{"id":109,"depth":142,"text":110},{"id":191,"depth":142,"text":192},{"id":235,"depth":142,"text":236},"The Nayalink REST API — create short links, manage campaigns and tags, and pull privacy-first click analytics. Base URL https:\u002F\u002Fapi.nayalink.co.","md",{"date":265},"2026-07-13",{"icon":17},"\u002Fdocs\u002Fapi-reference",{"title":12,"description":262},"9U8BpyZrkrlZp8Gta_a7y50R04kJuF_cBX3H18cV06k",[271,274],{"title":5,"path":272,"stem":7,"description":273,"icon":10,"children":-1},"\u002Fdocs\u002Fgetting-started","Nayalink turns long URLs into short links you can create from the dashboard or the REST API — with fast redirects and click analytics.",null,1785430392434]