API REFERENCEv1

Short URL analytics

GEThttps://api2.protexting.com/v1/shorturl/analytics
⌘

Use 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

FieldTypeDetails
idintegerRequired. Owned public link ID (or owned domain ID on domain/view).
analytics_rangestring (1h, 6h, 24h, 3d, 7d, 30d, custom)Optional.
analytics_fromstringOptional.
analytics_tostringOptional.
analytics_granularitystring (minute, hour, day)Optional.

Request example

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}"
Server-side exampleJSON · HTTPS

Response parameters

FieldTypeDetails
periodstring
timezonestring
timeline_granularitystring (minute, hour, day)
timeline_limitedboolean
generated_atstring
summaryobject
timelinearray
countriesarray
regionsarray
citiesarray
devicesarray
referrersarray
browsersarray
operating_systemsarray
campaign_responseobject
response_windowsarray

Response example

Illustrative values only; replace IDs and URLs with your saved records.

JSON response example
{  "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.

Reference from the ProTexting documentation catalog. Code examples are illustrative; this page does not execute API requests.