Developer docs

Build on the
OneLinkPilot API

REST endpoints for smart links, QR codes, campaigns, analytics, and webhooks — all scoped to your workspace.

Quick start in 3 steps

From zero to your first programmatic smart link in minutes.

1

Create an API key

Sign in to your dashboard → Settings → API Keys. Copy your live key (olp_live_…).

2

Authenticate

Send Authorization: Bearer TOKEN on every request, or login via POST /auth/login.

3

Create a link

POST to /links with iOS, Android, and fallback URLs. Start routing traffic immediately.

Authentication

Bearer token auth

Include your API key or login token in the Authorization header. All workspace endpoints require a valid bearer token.

  • API keys from dashboard settings
  • Login tokens expire after 1 hour
  • Workspace-scoped access control
Authorization header
Authorization: Bearer olp_live_xxxxx
Base URL

JSON REST API v1

All requests use Content-Type: application/json. Responses follow a consistent { success, data, error } envelope.

  • Production: https://api.dazzling-teal-porcupine.rainbowwinglabs.com/api/v1
  • Local: localhost:8081/api/v1
  • UTF-8 JSON everywhere
Base URL
https://api.dazzling-teal-porcupine.rainbowwinglabs.com/api/v1

API endpoints

Grouped by resource. All paths are relative to the base URL above.

Authentication

GET /health API health and database status
POST /auth/login Authenticate and receive a bearer token
POST /auth/register Create account and workspace
POST /auth/logout Invalidate current token

Smart Links

GET /links List smart links in workspace
POST /links Create a new smart link
GET /links/{id} Get link details and routing rules
PUT /links/{id} Update link destinations and settings
DELETE /links/{id} Archive a smart link

QR Codes

GET /qr-codes List QR codes in workspace
POST /qr-codes Generate a dynamic QR code
GET /qr-codes/{id} Get QR code metadata and scan stats

Campaigns & Analytics

GET /campaigns List campaigns
POST /campaigns Create a campaign
GET /analytics/summary Workspace KPIs and scan totals
GET /analytics/campaigns Campaign performance breakdown
GET /analytics/export Export analytics CSV

Workspace

GET /domains List custom domains
GET /team List workspace members
GET /api-keys List API keys
POST /webhooks Register a webhook endpoint

Example request

Create a smart link with device-specific destinations.

POST /links
POST https://api.dazzling-teal-porcupine.rainbowwinglabs.com/api/v1/links
Content-Type: application/json
Authorization: Bearer olp_live_xxxxx

{
  "alias": "summer-launch",
  "ios_url": "https://apps.apple.com/app/id123",
  "android_url": "https://play.google.com/store/apps/details?id=com.app",
  "fallback_url": "https://example.com/download"
}
200 Response
{
  "success": true,
  "data": {
    "id": 42,
    "alias": "summer-launch",
    "short_url": "https://lnk.io/summer-launch",
    "status": "active"
  }
}
cURL
curl -X POST https://api.dazzling-teal-porcupine.rainbowwinglabs.com/api/v1/links \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer olp_live_xxxxx" \
  -d '{"alias":"summer-launch","ios_url":"https://apps.apple.com/app/id123","android_url":"https://play.google.com/store/apps/details?id=com.app","fallback_url":"https://example.com/download"}'

Webhooks

Subscribe to real-time events. Failed deliveries retry up to 3 times via cron.

link_opened qr_scanned redirect_completed install_clicked campaign_created

Rate limits

Limits vary by plan. Response headers expose remaining quota.

Growth plan1,000 req/min
Scale plan10,000 req/min
HeadersX-RateLimit-Limit

Ready to integrate?

Create a free workspace, generate an API key, and start building in minutes.