API Documentation

Build powerful integrations with the Routiq REST API. Create links, track clicks, and manage routing rules programmatically.

Quick Start

1. Get Your API Key

Create an API key from your dashboard. Include it in the Authorization header.

Authorization: Bearer rq_your_api_key_here

3. cURL Examples by Link Type

Routiq supports multiple link generation strategies via the API:

Simple

Auto-Generated Slug

Provide destination URL only. Slug will automatically be generated.

curl -X POST https://routiq.link/api/v1/links \
  -H "Authorization: Bearer rq_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com/my-very-long-url"
  }'
Custom Slug

Custom Short Code

Specify your own custom slug alias (e.g. /my-promo).

curl -X POST https://routiq.link/api/v1/links \
  -H "Authorization: Bearer rq_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com/summer-sale",
    "slug": "my-promo"
  }'
With Folder

Organized in Folders

Organize links in folders (e.g. /marketing). The slug parameter is optional — if omitted, a slug is auto-generated inside the folder.

# Default: Auto-generated slug inside folder (slug omitted)
curl -X POST https://routiq.link/api/v1/links \
  -H "Authorization: Bearer rq_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com/campaign-page",
    "folder": "marketing"
  }'

# Optional: Custom slug inside folder
curl -X POST https://routiq.link/api/v1/links \
  -H "Authorization: Bearer rq_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com/campaign-page",
    "folder": "marketing",
    "slug": "black-friday"
  }'
Advanced

Password Protected & Expiring Links

Add password protection, expiration ISO timestamps, title, tags, and 301/302 redirect settings.

curl -X POST https://routiq.link/api/v1/links \
  -H "Authorization: Bearer rq_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "destinationUrl": "https://example.com/confidential-doc",
    "slug": "q3-financials",
    "folder": "reports",
    "password": "SecretPassword123!",
    "expiresAt": "2026-12-31T23:59:59Z",
    "redirectType": "301",
    "title": "Q3 Financial Report",
    "tags": ["finance", "confidential"]
  }'

Base URL

https://routiq.link/api/v1

All API endpoints are relative to this base URL.

Authentication

Include your API key in the Authorization header of every request:

Authorization: Bearer rq_your_api_key

API keys start with rq_ prefix.

Endpoints

POST/api/v1/links

Create a new smart link

GET/api/v1/links

List all links

Query params: page, limit, search

GET/api/v1/links/:id

Get link details

PUT/api/v1/links/:id

Update a link

DELETE/api/v1/links/:id

Delete a link

GET/api/v1/links/:id/stats

Get link analytics

Rate Limits

PlanRequests/SecondRequests/Day
Free101,000
Pro5050,000
Enterprise100Unlimited

Error Codes

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

Ready to Build?

Get your API key and start integrating in minutes.

Get Free API Key →