API Documentation

Redirectly API

Create, manage, and analyze your short links programmatically with our powerful REST API

Quick Start

Get up and running with the Redirectly API in minutes. All endpoints require authentication via API key.

Base URL

https://redirectly.app/api

Content Type

application/json

Authentication

All API requests require authentication using your API key as a Bearer token in the Authorization header.

bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://redirectly.app/api/links
Security Note

Keep your API key secure and never expose it in client-side code. Generate new keys from your dashboard if compromised.

Error Codes

400

Bad Request

Invalid input or missing required fields

401

Unauthorized

Missing or invalid API key

403

Forbidden

Access denied for this resource

404

Not Found

Requested resource does not exist

409

Conflict

Resource already exists (e.g. duplicate username)

429

Too Many Requests

Rate limit exceeded

500

Internal Server Error

Something went wrong on our end

Example Error Response

json
{
  "error": "Unauthorized",
  "message": "Invalid API key provided"
}

Links

Manage your permanent short links

Temporary Links

Create expiring short links

Analytics

Track link performance

GET

Get Stats

Access detailed analytics and metrics

Endpoint

GET /api/stats

Example Request

bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://redirectly.app/api/stats

Response

json
{
  "dailyStats": [
    { "day": "2024-06-01", "total": 45 },
    { "day": "2024-06-02", "total": 38 },
    { "day": "2024-06-03", "total": 52 }
  ],
  "totalClicks": 1250,
  "totalLinks": 15
}

Profile

User account management

GET

Get Profile

Retrieve user profile information

Endpoint

GET /api/profile

Example Request

bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://redirectly.app/api/profile

Response

json
{
  "id": "user-uuid",
  "username": "yourname",
  "created_at": "2024-06-01T12:00:00Z",
  "updated_at": "2024-06-01T12:00:00Z"
}
POST

Update Profile

Update user profile settings

Endpoint

POST /api/profile

Request Body

json
{
  "username": "new-username"
}

Parameters

username(required) - 3-20 characters, alphanumeric and hyphens only

Example Request

bash
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username": "new-username"}' \
  https://redirectly.app/api/profile

Response

json
{
  "id": "user-uuid",
  "username": "new-username",
  "created_at": "2024-06-01T12:00:00Z",
  "updated_at": "2024-06-01T12:00:00Z"
}

Mobile Integration

Mobile app deep linking

GET

Apple App Association

iOS app site association

GET

Android Asset Links

Android app verification

Need Help?

Check out our dashboard for more tools, or contact our support team if you need assistance.