Skip to Content
API Reference

API Reference

The SmartLinks API allows you to programmatically create and manage smart links, QR codes, and analytics.

Authentication

All API requests require authentication using an API key:

curl -H "Authorization: Bearer YOUR_API_KEY" \ https://api.smartlinks.com/v1/links

Get your API key from the dashboard settings.

Base URL

https://api.smartlinks.com/v1

Endpoints

Create Short URL

Create a new smart link:

POST /v1/links

Request Body:

{ "url": "https://example.com/product/123", "shortCode": "custom-code", "title": "My Product Link", "metadata": { "campaign": "summer-sale" } }

Response:

{ "id": "link_abc123", "shortCode": "custom-code", "shortUrl": "https://smart.link/custom-code", "url": "https://example.com/product/123", "createdAt": "2026-02-01T10:00:00Z" }

Retrieve information about a specific link:

GET /v1/links/{linkId}

Update an existing link:

PATCH /v1/links/{linkId}

Delete a link:

DELETE /v1/links/{linkId}

Get a paginated list of your links:

GET /v1/links?page=1&pageSize=20

Create QR Code

Generate a QR code for a link:

POST /v1/qr-codes

Request Body:

{ "linkId": "link_abc123", "size": 500, "format": "png", "style": { "dotsColor": "#000000", "backgroundColor": "#ffffff", "logo": "https://example.com/logo.png" } }

Get Analytics

Retrieve analytics for a link:

GET /v1/analytics/{linkId}?from=2026-01-01&to=2026-01-31

Response:

{ "linkId": "link_abc123", "period": { "from": "2026-01-01T00:00:00Z", "to": "2026-01-31T23:59:59Z" }, "metrics": { "clicks": 1250, "uniqueClicks": 980, "platforms": { "ios": 450, "android": 380, "web": 420 } } }

Rate Limits

API requests are limited to:

  • Free tier: 1000 requests/hour
  • Pro tier: 10,000 requests/hour
  • Enterprise: Custom limits

Error Codes

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn’t exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error

SDKs

Official SDKs are available for:

  • JavaScript/TypeScript (npm: @smartlinks/sdk)
  • Python (pip: smartlinks-sdk)
  • Ruby (gem: smartlinks)

TODO: This API documentation is a placeholder. Full documentation will be generated from:

Note: Once the backend APIs are finalized, this documentation should be auto-generated or manually updated to reflect actual endpoints, request/response schemas, and authentication methods.

Last updated on