Stats Endpoints
Complete reference for accessing analytics and click tracking data
The Stats API provides detailed analytics for your short links. All endpoints require authentication and appropriate scopes.
Available Endpoints
Complete list of stats and analytics endpoints and their purposes:
Endpoint | Method | Purpose | Required Scope |
---|---|---|---|
/user/stats | GET | Get link statistics for date range | stats:read |
GET /user/stats
GET /user/stats
Get link statistics for a date range.
Required Scope: stats:read
Request:
curl -X GET "https://api.tinyrebrand.com/api/user/stats?startDate=2024-06-01&endDate=2024-06-30&q=analytics" \
-H "Authorization: Bearer at_1234567890abcdef"
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
startDate | string | ✅ | Start date (YYYY-MM-DD) |
endDate | string | ✅ | End date (YYYY-MM-DD) |
q | string | ❌ | Search query |
Response:
{
"status": 200,
"code": "OK",
"message": "Stats fetched successfully",
"data": [
{
"id": "507f1f77bcf86cd799439019",
"date": "2024-06-15T10:30:00.000Z",
"userId": "507f1f77bcf86cd799439011",
"linkId": "507f1f77bcf86cd799439013",
"linkName": "Analytics Dashboard",
"domainId": "507f1f77bcf86cd799439014",
"domainName": "short.mycompany.com",
"utmSource": "newsletter",
"utmMedium": "email",
"utmCampaign": "june-campaign",
"visits": 42,
"passwordPassed": 40,
"passwordFailed": 2
}
],
"meta": {
"total": 1247
}
}