Tiny Rebrand DocsHome

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:

EndpointMethodPurposeRequired Scope
/user/statsGETGet link statistics for date rangestats:read
GET
/user/stats

Get link statistics

Get link statistics for a date range.

Bearer TokenScopes: 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"

Query Parameters

NameTypeDescription
startDaterequiredstringStart date (YYYY-MM-DD)
endDaterequiredstringEnd date (YYYY-MM-DD)
qstringSearch query

Response 200

{
"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
}
}