Hello Guest
Please Wait...
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.
| Method | POST |
|---|---|
| API Endpoint | https://insprl.com/api/external/analytics/report |
| Authentication | Required |
| Parameter | Type | Description |
|---|---|---|
| Authorization | String | Bearer authentication token received from the Login API. |
| X-Device-ID | String | The same device identifier used during login. |
| Content-Type | JSON | application/json |
| Parameter | Type | Validate | Description |
|---|---|---|---|
| slug | String | Required | Short URL slug. |
| days | Integer | Optional (1-365) | Number of days to include in the analytics report. Default: 30. |
| Parameter | Type | Description |
|---|---|---|
| success | Boolean | Request status (true/false). |
| data.url_id | Integer | Unique SPRL URL identifier. |
| data.slug | String | Short URL slug. |
| data.period_days | Integer | Reporting period in days. |
| data.summary | Object | Analytics summary data. |
| data.summary.total_clicks | Integer | Total clicks during the selected period. |
| data.summary.unique_visitors | Integer | Total unique visitors during the selected period. |
| data.summary.human_clicks | Integer | Total human clicks. |
| data.summary.bot_clicks | Integer | Total bot clicks. |
| data.summary.last_clicked_at | DateTime | Most recent click timestamp. |
| data.daily_stats | Array | Daily click statistics. |
| snapshot_date | Date | Analytics date. |
| total_events | Integer | Total clicks for the day. |
| unique_visitors | Integer | Unique visitors for the day. |
| data.countries | Array | Top countries by clicks. |
| country | String | Country name. |
| clicks | Integer | Total clicks from the country. |
| data.devices | Array | Device traffic distribution. |
| device | String | Device type (Desktop, Mobile, Tablet, Bot). |
| clicks | Integer | Total clicks from the device. |
| data.referrers | Array | Top referral sources. |
| source | String | Referral source. |
| clicks | Integer | Total clicks from the referral source. |
| 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. |
| 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:
X-Device-ID used during login must be supplied.We follow industry best practices for API security and data protection.
Our APIs are designed with authentication, rate limiting, and continuous security review.
Easy and Quick way to shorten link with SPRL!
Download ExtensionPlease feel free to contact us at 8088 948 172 for support.
Contact UsWe 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