Mon-Fri 10am - 6pm
Link Analytics
Base URL for your account: https://cpaas.studio
GET
/api/v1/urlinks/{id}/analytics
Retrieves click statistics, device breakdowns, browser breakdowns, and recent click logs for a specific URL link.
Parameters
| Param | Type | Required | Notes |
|---|---|---|---|
id |
integer | yes | The ID of the URL link. |
Request example
curl -X GET "https://cpaas.studio/api/v1/urlinks/15/analytics" \
-H "X-API-KEY: cpk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
<?php
$ch = curl_init('https://cpaas.studio/api/v1/urlinks/15/analytics');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-KEY: cpk_xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'],
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Success response (data)
{
"link": {
"id": 15,
"name": "Summer Promo Landing Page",
"slug": "summer-promo",
"redirect_url": "https://example.com/promotions/summer-2026",
"status": "approved",
"clicks_count": 42
},
"device_stats": {
"desktop": 30,
"mobile": 12
},
"browser_stats": {
"Chrome": 28,
"Safari": 10,
"Firefox": 4
},
"recent_clicks": [
{
"ip_address": "127.0.0.1",
"user_agent": "Mozilla/5.0 ...",
"referer": "https://google.com",
"device_type": "desktop",
"browser": "Chrome",
"clicked_at": "2026-09-16T17:30:00+00:00"
}
]
}
Errors
| Code | Status | When |
|---|---|---|
URL_LINK_NOT_FOUND |
404 | No link with that ID belongs to your account. |
Need more context? See Getting started for authentication, the response envelope, and the full error-code reference.