Public Beta

Build with BlinkURLs

Integrate blazing fast link shortening, tracking, and analytics directly into your own applications with our REST API.

Authentication

All API requests require authentication using a Bearer token. You can generate an API key from your account settings.

Include the key in the Authorization header of your HTTP requests. Keep your keys secure and do not expose them in client-side code.

cURL Example
curl -X GET "https://blinkurls.com/api/v1/links" \
  -H "Authorization: Bearer blk_your_api_key_here" \
  -H "Content-Type: application/json"

Endpoints

POST

/api/v1/links

Create a new short link programmatically.

Request Payload
{
  "originalUrl": "https://example.com/very/long/path",
  "title": "Summer Campaign", // Optional
  "shortCode": "myBrand", // Optional custom alias
  "domainId": "cuid_here", // Optional custom domain
  "expiresAt": "2026-12-31T00:00:00Z", // Optional ISO date
  "maxClicks": 1000, // Optional click cap
  "iosUrl": "https://apps.apple.com/app/id123", // Optional iOS redirect
  "androidUrl": "https://play.google.com/store/apps/details?id=app", // Optional Android redirect
  "utmCampaign": "summer_sale" // Optional UTM tag
}
JSON Response
{
  "data": {
    "id": 1042,
    "shortCode": "myBrand",
    "originalUrl": "https://example.com...",
    "title": "Summer Campaign",
    "createdAt": "2026-07-22T12:00:00Z"
  }
}
GET

/api/v1/links

List your active short links with pagination.

Request Payload
// Query Params
?page=1&limit=50
JSON Response
{
  "data": [
    {
      "id": 1042,
      "shortCode": "myBrand",
      "originalUrl": "https://example.com...",
      "clicksCount": 142
    }
  ],
  "meta": {
    "total": 45,
    "page": 1,
    "limit": 50,
    "totalPages": 1
  }
}
GET

/api/v1/links/:id

Retrieve complete details for a specific short link by ID.

JSON Response
{
  "data": {
    "id": 1042,
    "shortCode": "myBrand",
    "originalUrl": "https://example.com...",
    "title": "Summer Campaign",
    "clicksCount": 142,
    "isActive": true
  }
}
PATCH

/api/v1/links/:id

Update destination URL, title, expiration date, or settings of an existing link.

Request Payload
{
  "originalUrl": "https://example.com/new-path",
  "title": "Updated Campaign Title",
  "isActive": true
}
JSON Response
{
  "data": {
    "id": 1042,
    "shortCode": "myBrand",
    "originalUrl": "https://example.com/new-path",
    "title": "Updated Campaign Title"
  }
}
DELETE

/api/v1/links/:id

Permanently delete a short link and its settings.

JSON Response
{
  "message": "Link deleted successfully"
}
GET

/api/v1/links/:id/stats

Retrieve click analytics and conversion stats for a specific link.

JSON Response
{
  "data": {
    "totalClicks": 1450,
    "conversions": 12,
    "totalRevenue": 450.00,
    "recentClicks": [
      {
        "createdAt": "2026-07-22T12:05:00Z",
        "country": "US",
        "device": "Mobile",
        "browser": "Safari",
        "referer": "twitter.com"
      }
    ]
  }
}

Webhooks

Webhooks allow you to build real-time integrations that react to events on your BlinkURLs account. When an event occurs, we'll send a POST request with a JSON payload to your configured URL.

Event Types

  • link.createdEnterprise
    Fires immediately when a new short link is created via account or API.
  • link.updatedMarketer
    Fires when a link's destination, alias, or settings are modified.
  • link.deletedMarketer
    Alerts when a short link is permanently removed.
  • click.createdEnterprise
    Real-time data stream for every individual click (Visitor IP, OS, etc).
  • referral.createdPartner
    Notifies a partner when their referral link leads to a new registration.

Payload Example

{
  "event": "click.created",
  "timestamp": "2024-03-20T12:05:00Z",
  "data": {
    "shortCode": "myBrand",
    "country": "US",
    "browser": "Chrome",
    "os": "iOS",
    "utm": {
      "source": "twitter",
      "medium": "social"
    }
  }
}

Tip: Use the "Test Webhook" button in your Settings to see the exact format for each event.

Rate Limits

API endpoints are rate-limited to 60 write requests/min (creations, updates, deletions) and 120 read requests/min per API key. Rate limit status headers (X-RateLimit-Remaining and X-RateLimit-Reset) are included in all responses. Need higher enterprise volume? Contact us.