Oops! Facing network problem. Unable to load this page. Refresh

Please Wait...

Hello Guest

logo

Analytics Report

Analytics Report api document


APIs

Analytics Report

Getting Started

Authenticate using the Login API to obtain an access token. Include the returned Bearer Token in the Authorization header and provide a unique X-Device-ID with all authenticated requests. All requests must be made over HTTPS and are subject to rate limits.

Base URL: https://insprl.com/api

POST /external/analytics/report
Use the Analytics Report API to retrieve detailed performance metrics for an existing short URL. This endpoint provides click activity, visitor insights, device statistics, browser usage, geographic data, referral sources, and historical trends for reporting and business intelligence purposes.

Request Information

MethodPOST
API Endpointhttps://insprl.com/api/external/analytics/report
Authentication Required

Header Parameters

ParameterTypeDescription
AuthorizationStringBearer authentication token received from the Login API.
X-Device-IDStringThe same device identifier used during login.
Content-TypeJSONapplication/json

Request Parameters

ParameterTypeValidateDescription
slugStringRequiredShort URL slug.
daysIntegerOptional (1-365)Number of days to include in the analytics report. Default: 30.

Response Parameters

ParameterTypeDescription
successBooleanRequest status (true/false).
data.url_idIntegerUnique SPRL URL identifier.
data.slugStringShort URL slug.
data.period_daysIntegerReporting period in days.
data.summaryObjectAnalytics summary data.
data.summary.total_clicksIntegerTotal clicks during the selected period.
data.summary.unique_visitorsIntegerTotal unique visitors during the selected period.
data.summary.human_clicksIntegerTotal human clicks.
data.summary.bot_clicksIntegerTotal bot clicks.
data.summary.last_clicked_atDateTimeMost recent click timestamp.
data.daily_statsArrayDaily click statistics.
snapshot_dateDateAnalytics date.
total_eventsIntegerTotal clicks for the day.
unique_visitorsIntegerUnique visitors for the day.
data.countriesArrayTop countries by clicks.
countryStringCountry name.
clicksIntegerTotal clicks from the country.
data.devicesArrayDevice traffic distribution.
deviceStringDevice type (Desktop, Mobile, Tablet, Bot).
clicksIntegerTotal clicks from the device.
data.referrersArrayTop referral sources.
sourceStringReferral source.
clicksIntegerTotal clicks from the referral source.

Response Codes

SPRL Code HTTP Status Mode Response Field Description
100 200 success data Request processed successfully.
101 401 failed message Authentication failed. Invalid session, token or credentials.
102 422 failed errors Parameter validation failed. Check the request fields.
103 404 failed message Requested resource was not found.
104 403 failed message Access denied or account restricted.
105 429 failed message Too many requests. Please retry later.
106 500 failed message Unexpected server error. Please try again later.

Error Flag Reference

Category Flag Type Description
Authentication INVALID_SESSION auth_error The supplied token or device identifier is invalid.
Authentication INVALID_CREDENTIALS auth_error Invalid login credentials supplied.
Validation INVALID_PARAMETER validation_error One or more request parameters are invalid.
Resource RESOURCE_NOT_FOUND resource_error The requested URL, folder, domain or resource could not be found.
Account ACCOUNT_RESTRICTED account_error The account is restricted or access has been denied.
Rate Limit RATE_LIMIT_EXCEEDED rate_limit_exceeded The request rate limit has been exceeded.
Server UNEXPECTED_ERROR server_error An unexpected internal server error occurred.

Notes:

  • Only URLs belonging to the authenticated SPRL account can be analyzed.
  • The same X-Device-ID used during login must be supplied.
  • Authentication is required for all requests to this endpoint.
  • Analytics tracking must be enabled for your account.
  • Reports are generated from aggregated analytics data.
  • Country, device and referral data are limited to the top-performing records.
99.9% Uptime
High Availability Infrastructure
Enterprise Security
OWASP-Aligned Controls
Built for Scale
High-Performance REST APIs

Security & Compliance

We follow industry best practices for API security and data protection.

Our APIs are designed with authentication, rate limiting, and continuous security review.

View our Security & Compliance Overview (PDF)
sprl chrome extension

Download the SPRL Google Chrome extension, It's free!

Easy and Quick way to shorten link with SPRL!

 Download Extension

We provide best customer support.

Please feel free to contact us at 8088 948 172 for support.

Contact Us
×

We use cookies to improve your experience, analyse traffic, and personalise content. By clicking “Accept”, you consent to the use of cookies as described in our Cookie Policy .

Accept cookies Read our Cookie Policy