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 -X GET "https://blinkurls.com/api/v1/links" \
-H "Authorization: Bearer blk_your_api_key_here" \
-H "Content-Type: application/json"Endpoints
/api/v1/links
Create a new short link programmatically.
{
"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
}{
"data": {
"id": 1042,
"shortCode": "myBrand",
"originalUrl": "https://example.com...",
"title": "Summer Campaign",
"createdAt": "2026-07-22T12:00:00Z"
}
}/api/v1/links
List your active short links with pagination.
// Query Params
?page=1&limit=50{
"data": [
{
"id": 1042,
"shortCode": "myBrand",
"originalUrl": "https://example.com...",
"clicksCount": 142
}
],
"meta": {
"total": 45,
"page": 1,
"limit": 50,
"totalPages": 1
}
}/api/v1/links/:id
Retrieve complete details for a specific short link by ID.
{
"data": {
"id": 1042,
"shortCode": "myBrand",
"originalUrl": "https://example.com...",
"title": "Summer Campaign",
"clicksCount": 142,
"isActive": true
}
}/api/v1/links/:id
Update destination URL, title, expiration date, or settings of an existing link.
{
"originalUrl": "https://example.com/new-path",
"title": "Updated Campaign Title",
"isActive": true
}{
"data": {
"id": 1042,
"shortCode": "myBrand",
"originalUrl": "https://example.com/new-path",
"title": "Updated Campaign Title"
}
}/api/v1/links/:id
Permanently delete a short link and its settings.
{
"message": "Link deleted successfully"
}/api/v1/links/:id/stats
Retrieve click analytics and conversion stats for a specific link.
{
"data": {
"totalClicks": 1450,
"conversions": 12,
"totalRevenue": 450.00,
"conversionRate": 0.83,
"revenuePerClick": 0.31,
"clicksByPlatform": {
"mobile": 920,
"desktop": 480,
"tablet": 40,
"unknown": 10
},
"clicksByDevice": {
"mobile": 920,
"desktop": 480,
"tablet": 40,
"unknown": 10
},
"clicksBySocialPlatform": {
"instagram": 620,
"x": 410,
"linkedin": 210,
"facebook": 110,
"threads": 40,
"tiktok": 20,
"youtube": 10,
"pinterest": 0,
"reddit": 0,
"bluesky": 0,
"other": 20,
"direct": 10
},
"recentClicks": [
{
"createdAt": "2026-07-22T12:05:00Z",
"country": "US",
"device": "mobile",
"browser": "Safari",
"referer": "https://l.instagram.com/",
"utmSource": "instagram",
"utmMedium": "bio_link",
"utmCampaign": "summer26"
}
]
}
}/api/v1/links/bulk
Batch create up to 50 short links in a single request. Returns HTTP 207 Multi-Status with per-item status and errors. Requires Social plan or higher.
{
"links": [
{
"originalUrl": "https://example.com/blog/article-1",
"title": "Article 1",
"utmCampaign": "newsletter_spring"
},
{
"originalUrl": "https://example.com/products/widget-2",
"shortCode": "spring-widget",
"domainId": "cuid_here"
}
]
}// HTTP/1.1 207 Multi-Status
{
"data": [
{
"id": 1043,
"shortCode": "k9xP2a",
"originalUrl": "https://example.com/blog/article-1",
"title": "Article 1",
"utmCampaign": "newsletter_spring",
"createdAt": "2026-09-12T12:00:00Z"
},
{
"id": 1044,
"shortCode": "spring-widget",
"originalUrl": "https://example.com/products/widget-2",
"createdAt": "2026-09-12T12:00:00Z"
}
],
"errors": [],
"meta": {
"total": 2,
"succeeded": 2,
"failed": 0
}
}/api/v1/domains
List custom and branded domains configured on your account or workspace, including verification status and default domain.
{
"data": [
{
"id": "dom_cl9x82...",
"domain": "links.mybrand.com",
"verified": true,
"isDefault": true,
"createdAt": "2026-08-15T08:30:00Z"
},
{
"id": "dom_cl9x83...",
"domain": "go.campaign.co",
"verified": false,
"isDefault": false,
"createdAt": "2026-09-01T14:15:00Z"
}
]
}/api/v1/analytics
Retrieve account-wide aggregated click analytics, daily time series, device breakdowns, and top-performing links. Cached for 5 minutes.
// Query Params (default: last 30 days, max 365 days)
?from=2026-08-12&to=2026-09-12{
"data": {
"totalClicks": 12850,
"clicksByDay": [
{ "date": "2026-09-10", "clicks": 412 },
{ "date": "2026-09-11", "clicks": 589 },
{ "date": "2026-09-12", "clicks": 634 }
],
"topLinks": [
{
"id": 1042,
"shortCode": "myBrand",
"originalUrl": "https://example.com/summer-sale",
"clicks": 3420
},
{
"id": 1043,
"shortCode": "launch26",
"originalUrl": "https://example.com/product-launch",
"clicks": 1890
}
],
"clicksByPlatform": {
"mobile": 7200,
"desktop": 4850,
"tablet": 650,
"unknown": 150
},
"clicksByDevice": {
"mobile": 7200,
"desktop": 4850,
"tablet": 650,
"unknown": 150
},
"clicksBySocialPlatform": {
"instagram": 4200,
"x": 3100,
"linkedin": 2400,
"facebook": 1200,
"threads": 450,
"youtube": 300,
"tiktok": 150,
"pinterest": 50,
"reddit": 40,
"bluesky": 20,
"other": 740,
"direct": 200
}
},
"meta": {
"from": "2026-08-12",
"to": "2026-09-12",
"cachedAt": "2026-09-12T15:00:00.000Z"
}
}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.createdEnterpriseFires immediately when a new short link is created via account or API.
- link.updatedMarketerFires when a link's destination, alias, or settings are modified.
- link.deletedMarketerAlerts when a short link is permanently removed.
- click.createdEnterpriseReal-time data stream for every individual click (Visitor IP, OS, etc).
- referral.createdPartnerNotifies 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 per API key: 60 req/min for link writes, 120 req/min for link reads, 60 req/min for domains, 10 req/min for bulk link creation (up to 50 links per request), and 20 req/min for aggregated analytics (cached for 5 minutes). Rate limit status headers (X-RateLimit-Remaining and X-RateLimit-Reset) are included in all responses. Need higher enterprise volume? Contact us.