---
title: "Workspace Metrics API Reference"
description: "Endpoints for analyzing workspace activity within Linkbreakers, covering rolling event totals, audience reach, and calendar heatmaps."
canonical: "https://linkbreakers.com/help/api/workspace-metrics"
---

# Workspace Metrics

Endpoints for analyzing workspace activity within Linkbreakers, covering rolling event totals, audience reach, and calendar heatmaps.

## Workspace Metrics

## [#](#workspace-metrics-object)EventsMetric

Aggregated analytics calculated on demand for time windows, giving Linkbreakers UIs headline numbers without exposing raw events.

firstAt

string (date-time)

Timestamp of the first event in the aggregated range

lastAt

string (date-time)

Timestamp of the last event in the aggregated range

topCity

string

The top city

topCountry

string

The top country (ISO code or name)

topDeviceType

string (enum)

DeviceType represents the physical form factor of the device. This describes the hardware category (phone, tablet, laptop, etc.), NOT who or what is operating it — see DeviceActor for that.

##### Allowed values

`DEVICE_TYPE_UNSPECIFIED`

Device type not specified or not yet detected

`DEVICE_TYPE_NATIVE`

Native QR scanner (no browser capabilities reported)

`DEVICE_TYPE_MOBILE`

Mobile handset browser

`DEVICE_TYPE_TABLET`

Tablet browser

`DEVICE_TYPE_DESKTOP`

Desktop or laptop browser

`DEVICE_TYPE_UNKNOWN`

Unable to classify the device

totalCities

integer (int32)

Total number of unique cities seen in the events

totalCountries

integer (int32)

Total number of unique countries seen in the events

totalDeviceTypes

integer (int32)

Number of unique device types

totalEvents

integer (int32)

Total number of events matching the query window

Example object

```json
{
  "firstAt": "2026-10-25T05:41:36.694Z",
  "lastAt": "2026-10-25T05:41:36.694Z",
  "topCity": "string",
  "topCountry": "string",
  "topDeviceType": "DEVICE_TYPE_DESKTOP",
  "totalCities": 0,
  "totalCountries": 0,
  "totalDeviceTypes": 0,
  "totalEvents": 0
}
```

GET

`/v1/metrics/events`

Requires auth

## [#](#get-events-metric)Get events metric

Retrieve aggregated event analytics for the provided time window and optional link filter. Requires the \`analytics:read\` scope.

### [#](#get-events-metric-parameters)Parameters

#### query parameters

startDate

string (date-time)

query

Inclusive start timestamp for the aggregation

endDate

string (date-time)

query

Inclusive end timestamp for the aggregation

linkId

string

query

Optional link filter (UUID); when omitted aggregates workspace-wide UUID format

### [#](#get-events-metric-response)Response

200

Everything worked as expected.

firstAt

string (date-time)

Timestamp of the first event in the aggregated range

lastAt

string (date-time)

Timestamp of the last event in the aggregated range

topCity

string

The top city

topCountry

string

The top country (ISO code or name)

topDeviceType

string (enum)

DeviceType represents the physical form factor of the device. This describes the hardware category (phone, tablet, laptop, etc.), NOT who or what is operating it — see DeviceActor for that.

##### Allowed values

`DEVICE_TYPE_UNSPECIFIED`

Device type not specified or not yet detected

`DEVICE_TYPE_NATIVE`

Native QR scanner (no browser capabilities reported)

`DEVICE_TYPE_MOBILE`

Mobile handset browser

`DEVICE_TYPE_TABLET`

Tablet browser

`DEVICE_TYPE_DESKTOP`

Desktop or laptop browser

`DEVICE_TYPE_UNKNOWN`

Unable to classify the device

totalCities

integer (int32)

Total number of unique cities seen in the events

totalCountries

integer (int32)

Total number of unique countries seen in the events

totalDeviceTypes

integer (int32)

Number of unique device types

totalEvents

integer (int32)

Total number of events matching the query window

### [#](#get-events-metric-error)Error response

400-599

All endpoints may return an unexpected error payload when a request cannot be processed.

error

object

Required

Wrapped error response.

Example request (cURL)

```bash
curl -X GET "https://api.linkbreakers.com/v1/metrics/events?startDate={startDate}&endDate={endDate}&linkId={linkId}" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

Typical response

```json
{
  "firstAt": "2026-10-25T05:41:36.694Z",
  "lastAt": "2026-10-25T05:41:36.694Z",
  "topCity": "string",
  "topCountry": "string",
  "topDeviceType": "DEVICE_TYPE_DESKTOP",
  "totalCities": 0,
  "totalCountries": 0,
  "totalDeviceTypes": 0,
  "totalEvents": 0
}
```

Base URL: `https://api.linkbreakers.com`

GET

`/v1/metrics/workspace`

Requires auth

## [#](#get-workspace-metric)Get workspace metric

Return high-level workspace totals covering members, links, and activity volume. Requires the \`analytics:read\` scope.

### [#](#get-workspace-metric-parameters)Parameters

This endpoint does not accept any parameters.

### [#](#get-workspace-metric-response)Response

200

Everything worked as expected.

tokenCreditsLimit

integer (int32)

Monthly platform credits limit for the current cycle (0 means unlimited)

tokenCreditsUsed

integer (int32)

Monthly platform credits consumed in the current cycle

topupCreditsLimit

integer (int32)

Top-up credits total purchased (available = limit - used)

topupCreditsUsed

integer (int32)

Top-up credits consumed (from purchased credit packs)

totalDirectories

integer (int32)

Total number of directories (including subdirectories) in the workspace

totalEvents

integer (int32)

Historical count of events generated by the workspace

totalLinks

integer (int32)

Number of short links created within the workspace

totalMembers

integer (int32)

Total number of active members in the workspace

totalMonthlyEvents

integer (int32)

Events created within the current rolling month window

totalPageThemeTemplates

integer (int32)

Number of page theme templates owned by the workspace

totalQrcodeTemplates

integer (int32)

Number of QR code templates owned by the workspace

### [#](#get-workspace-metric-error)Error response

400-599

All endpoints may return an unexpected error payload when a request cannot be processed.

error

object

Required

Wrapped error response.

Example request (cURL)

```bash
curl -X GET "https://api.linkbreakers.com/v1/metrics/workspace" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

Typical response

```json
{
  "tokenCreditsLimit": 0,
  "tokenCreditsUsed": 0,
  "topupCreditsLimit": 0,
  "topupCreditsUsed": 0,
  "totalDirectories": 0,
  "totalEvents": 0,
  "totalLinks": 0,
  "totalMembers": 0,
  "totalMonthlyEvents": 0,
  "totalPageThemeTemplates": 0,
  "totalQrcodeTemplates": 0
}
```

Base URL: `https://api.linkbreakers.com`

GET

`/v1/metrics/workspace/insight`

Requires auth

## [#](#get-workspace-insight)Get workspace insight

Return workspace usage insights including the preferred link type based on historical link creation patterns. Requires the \`analytics:read\` scope.

### [#](#get-workspace-insight-parameters)Parameters

This endpoint does not accept any parameters.

### [#](#get-workspace-insight-response)Response

200

Everything worked as expected.

preferredLinkType

string (enum)

PreferredLinkType indicates the dominant link creation pattern for a workspace.

##### Allowed values

`PREFERRED_LINK_TYPE_URL`

Default when no links exist yet — treated as URL

`PREFERRED_LINK_TYPE_CONTACT_CARD`

Workspace primarily creates contact card links

`PREFERRED_LINK_TYPE_SOCIAL_LINKS_PAGE`

Workspace primarily creates social links pages

`PREFERRED_LINK_TYPE_MIX`

Workspace uses a mix of different link types

`PREFERRED_LINK_TYPE_OPEN_MEDIA`

Workspace primarily creates links that hand out media (OPEN\_MEDIA exit step)

### [#](#get-workspace-insight-error)Error response

400-599

All endpoints may return an unexpected error payload when a request cannot be processed.

error

object

Required

Wrapped error response.

Example request (cURL)

```bash
curl -X GET "https://api.linkbreakers.com/v1/metrics/workspace/insight" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

Typical response

```json
{
  "preferredLinkType": "PREFERRED_LINK_TYPE_URL"
}
```

Base URL: `https://api.linkbreakers.com`

---

Source: https://linkbreakers.com/help/api/workspace-metrics
