Short URL analytics
https://api2.protexting.com/v1/shorturl/analyticsUse Authorization: Bearer with your server-side token. Legacy access_token URLs remain supported. Replace sample values with your own. Authentication & setup →
Use your existing OAuth access_token query parameter, with the Short URL API app active. Send Accept: application/json and Content-Type: application/json for JSON writes. Action-scoped tokens can call only the permitted action. Every link action is limited to your owned, public, non-deleted parent links. Smart URLs is a separate system.
This returns the same cached human-click dashboard as the member UI: total, unique and returning clicks; timeline; country, region, city, device, referrer, browser and operating-system breakdowns; campaign response metrics and saved time frames. Proven automation and the saved opt-out policy are filtered consistently. Custom dates are inclusive, at most 186 days, and cannot end in the future. Timezone, timeline and breakdown limits match the UI. Invalid ranges fail with 422; they never silently broaden the report.
GET /v1/shorturl/analytics
Shared UI dashboard. Custom dates are inclusive, at most 186 days, no later than today. Invalid ranges fail with 422. Timezone and chart limits match the UI.
Request parameters
| Field | Type | Details |
|---|---|---|
| id | integer | Required. Owned public link ID (or owned domain ID on domain/view). |
| analytics_range | string (1h, 6h, 24h, 3d, 7d, 30d, custom) | Optional. |
| analytics_from | string | Optional. |
| analytics_to | string | Optional. |
| analytics_granularity | string (minute, hour, day) | Optional. |
Request example
# Set PROTEXTING_ACCESS_TOKEN in your environmentcurl --request GET \ "https://api2.protexting.com/v1/shorturl/analytics?id=123&analytics_range=7d&analytics_granularity=day" \ --header 'Accept: application/json' \ --header "Authorization: Bearer ${PROTEXTING_ACCESS_TOKEN:?Set your API token}"Response parameters
| Field | Type | Details |
|---|---|---|
| period | string | |
| timezone | string | |
| timeline_granularity | string (minute, hour, day) | |
| timeline_limited | boolean | |
| generated_at | string | |
| summary | object | |
| timeline | array | |
| countries | array | |
| regions | array | |
| cities | array | |
| devices | array | |
| referrers | array | |
| browsers | array | |
| operating_systems | array | |
| campaign_response | object | |
| response_windows | array |
Response example
Illustrative values only; replace IDs and URLs with your saved records.
{ "period": "7d", "timezone": "UTC", "timeline_granularity": "day", "timeline_limited": false, "generated_at": "2026-01-03T12:00:00+00:00", "summary": { "total_clicks": 2, "unique_visitors": 1, "returning_clicks": 1 }, "timeline": [ { "date": "2026-01-02T00:00:00+00:00", "clicks": 2, "visitors": 1 } ], "countries": [], "regions": [], "cities": [], "devices": [], "referrers": [], "browsers": [], "operating_systems": [], "campaign_response": {}, "response_windows": [ { "type": "elapsed", "value": 5, "unit": "minutes" }, { "type": "calendar", "from": "2026-01-01", "to": "2026-01-02" } ]}HTTP status codes
200 success; create/add return 201; link deletion returns 204 without a body. 401: missing/invalid token or disabled API app. 403: denied scope or tracking entitlement. 404: unavailable link or disabled domain feature. 405: wrong HTTP method. 409: reset already in progress. 422: invalid input, invalid dates or unavailable/foreign domain. 503: allocation/custom-deletion failure or unavailable reset signing. Other database/provider failures remain server errors.
Related Short URL reference
Reference from the ProTexting documentation catalog. Code examples are illustrative; this page does not execute API requests.