Link Metrics
Retrieve the lifetime metrics of a single link — views, opens, installs, reinstalls, time spent, reactivations, referrals, and revenue.
https://sdk.sqd.link/api/v1/sdk/metrics_for_link/:link_pathFetch the lifetime metrics of a link using its unique path identifier.
Replace :link_path with the link's unique path (e.g., 2c1e79, or 2c1e79-test in the test environment). The path is looked up within the environment named by the ENVIRONMENT header.
Headers
PROJECT-KEYstringrequiredYour SDK project key. Found in Dashboard → Developer → API Key.
ENVIRONMENTstringrequiredTarget environment. Use production or test. Any other value returns 400.
Example request
curl -X GET "https://sdk.sqd.link/api/v1/sdk/metrics_for_link/2c1e79" \
-H "PROJECT-KEY: your-api-key" \
-H "ENVIRONMENT: production"Response
{
"metrics": {
"id": 4821,
"name": "Summer sale",
"path": "2c1e79",
"title": "Summer Sale",
"subtitle": "50% off everything",
"active": true,
"sdk_generated": true,
"data": { "promo": "summer25" },
"tags": ["campaign", "summer"],
"updated_at": "2026-09-14T10:21:33.000Z",
"show_preview_ios": null,
"show_preview_android": null,
"copy_to_clipboard_ios": null,
"copy_to_clipboard_android": null,
"ads_platform": null,
"generated_from_platform": "API",
"tracking_source": "instagram",
"tracking_medium": "social",
"tracking_campaign": "summer_2025",
"visitor_id": null,
"campaign_id": null,
"total_views": 1250,
"total_opens": 840,
"total_installs": 312,
"total_reinstalls": 18,
"total_time_spent": 96420,
"total_reactivations": 41,
"total_app_opens": 2210,
"total_user_referred": 7,
"total_revenue": 149900
}
}The metrics object contains the link's descriptive fields (the same ones Link Details returns, without the image and custom redirects) plus the lifetime totals below.
total_viewsintegerTimes the link was opened in a browser.
total_opensintegerTimes the link opened the app, including deferred opens after install.
total_installsintegerInstalls attributed to the link.
total_reinstallsintegerReinstalls attributed to the link.
total_time_spentintegerTotal engagement time of users attributed to the link, in seconds.
total_reactivationsintegerUsers attributed to the link who returned after at least seven days of inactivity.
total_app_opensintegerApp opens by users attributed to the link.
total_user_referredintegerInstalls referred by the link's creator, for links created by a user in your app.
total_revenueintegerRevenue attributed to the link, in cents. 0 unless revenue tracking is enabled.
Totals cover the link's whole lifetime, subject to your project's analytics retention window. On the Grovs cloud, events older than the retention period are not included.
Errors
| Status | Meaning |
|---|---|
404 | No link with that path exists in the given environment. Body: {"error": "Link not found"}. |
See Errors for the shared status codes.