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,
"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.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 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.