The SDK is currently in active development. For more details, see the U301 Postman docs.

Track and analyze all click events in your workspace

Use this API to retrieve recent click activity at the workspace level. It aggregates clicks across all short links in the workspace.

If you are in London (Europe/London) and want hourly clicks for today, call:

u301.analytics.getClicks
import { U301 } from 'u301';

const apiKey = '<YOUR_API_KEY>';
const workspaceId = '<YOUR_WORKSPACE_ID>';

const u301 = new U301({
  apiKey,
  workspaceId,
});

const clicks = await u301.analytics.getClicks({
    range: '1d',
    granularity: 'hour',
    timezone: 'Europe/London'
})

the response schema

Request

NameLocationTypeRequiredDefaultDescription
AuthorizationHeaderstringBearer token used for authentication.
workspaceIdQuerystringWorkspace identifier for multi‑tenant routing.
rangeQuerystringTime range for click data aggregation.
granularityQuerystringTime granularity for click data aggregation.
timezoneQuerystringUTCTimezone for click data aggregation.

Response

NameTypeDescription
startstringStart time of the click data aggregation in YYYY-MM-DDTHH:mm:ss.sssZ format.
endstringEnd time of the click data aggregation in YYYY-MM-DDTHH:mm:ss.sssZ format.
dataarrayArray of click data objects.
data[].datestringDate of the click in YYYY-MM-DD format for day granularity, or YYYY-MM-DD HH:mm:ss format for hour granularity.
data[].clicknumberNumber of clicks for the specified date and hour.
{
    "start": "2025-11-15T00:00:00.000Z",
    "end": "2025-11-15T23:59:59.999Z",
    "data": [
        {
        "date": "2025-11-15 00:00:00",
        "click": 10
        },
        {
        "date": "2025-11-15 01:00:00",
        "click": 15
        },
        // ... more hourly data,
        {
            "date": "2025-11-15 23:00:00",
            "click": 0
        }
    ]
}

Last updated on

On this page