shorten.dev/docs
shorten.dev/docs
Getting StartedAuthentication
OverviewTypeScript
SDKs

Overview

Official TypeScript SDK for the Shorten.dev API.

Shorten provides an official TypeScript SDK that wraps the REST API with typed methods, automatic retries, and rate-limit handling.

Available SDK

TypeScript

Hand-written, resource-based API. Works in Node.js, Bun, Deno, and browsers.

Authentication

All SDKs authenticate using API keys. Create one at shorten.dev/api-keys. Keys are prefixed with sk_ and passed as a Bearer token.

API coverage

The SDK covers all 7 API endpoints:

MethodEndpointSDK method
POST/linkslinks.create()
GET/linkslinks.list()
GET/links/{slug}links.get()
POST/links/{slug}/revokelinks.revoke()
POST/links/bulklinks.bulkCreate()
GET/links/{slug}/analyticsanalytics.get()
GET/usageusage.get()

More languages coming soon

We're working on official SDKs for Python, Go, and C#. If you need SDK support for another language, open a support ticket and let us know.

Errors & Rate Limits

Error codes, response format, rate limits, and retry strategies.

TypeScript

Official TypeScript SDK for the Shorten.dev API.

On this page

Available SDKAuthenticationAPI coverage