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/linksGet your API key from the dashboard settings.
Base URL
https://api.smartlinks.com/v1Endpoints
Create Short URL
Create a new smart link:
POST /v1/linksRequest 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"
}Get Link Details
Retrieve information about a specific link:
GET /v1/links/{linkId}Update Link
Update an existing link:
PATCH /v1/links/{linkId}Delete Link
Delete a link:
DELETE /v1/links/{linkId}List Links
Get a paginated list of your links:
GET /v1/links?page=1&pageSize=20Create QR Code
Generate a QR code for a link:
POST /v1/qr-codesRequest 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-31Response:
{
"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
| Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid API key |
| 403 | Forbidden - Insufficient permissions |
| 404 | Not Found - Resource doesn’t exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Internal 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:
- Swagger/OpenAPI specs (running locally, not in production)
- Backend API implementation from epics SMR-38 and SMAR-14
- Confluence documentation: External APIs - Functional Requirements
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.