> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Link Click Breakdown

> See which links in your emails get clicked, across every email.

Returns clicks per link destination across every email in the time range, ranked by unique clicks. Use it to see which pages your emails send people to, without opening each campaign.

Each subscriber counts once per link in `uniqueClicks`, however often they clicked it, so double taps, repeat visits and the same footer link clicked in several emails do not inflate the ranking. `clicks` still counts every click.

Destinations ignore query strings, fragments and trailing slashes, so `https://example.com/pricing?utm_campaign=april` and `https://example.com/pricing/` both count as `https://example.com/pricing`. Links that differ only by query parameters, such as video or product IDs, are combined too. Test sends are excluded, and detected email-security scanners and link previews are excluded unless you set `includeMachineEngagement=true`. For one campaign's links with exact URLs, read `clickedLinks` from [Get Campaign Metrics](/api-reference/analytics/campaign-metrics).

## Query Parameters

<ParamField query="period" type="string" default="90d">
  Sliding window over click times. One of: `1h`, `24h`, `7d`, `30d`, `90d`.
  Ignored when `start` and `end` are provided.
</ParamField>

<ParamField query="start" type="string">
  Start of custom time range (ISO 8601). Must be used with `end`.
</ParamField>

<ParamField query="end" type="string">
  End of custom time range (ISO 8601). Must be used with `start`. Max range: 90
  days.
</ParamField>

<ParamField query="emailType" type="string">
  Optional structural filter: `campaign`, `sequence`, or `transactional`.
  Marketer-role personal keys only see links from the campaigns and sequence
  emails their role can open, and receive `403` for `transactional`.
</ParamField>

<ParamField query="mailboxProvider" type="string">
  Optional recipient mailbox provider filter, for example `gmail`, `microsoft`,
  `yahoo`, or `icloud`.
</ParamField>

<ParamField query="limit" type="number" default="10">
  Number of destinations to return, from `1` to `50`.
</ParamField>

<ParamField query="includeMachineEngagement" type="boolean" default="false">
  Set to `true` to include detected scanner and link-preview clicks.
</ParamField>

## Response Fields

<ResponseField name="period" type="string">
  Applied period, or `custom` when `start` and `end` were provided.
</ResponseField>

<ResponseField name="totalClicks" type="number">
  Click events across every destination, repeats included, before `limit` is
  applied. `0` when nothing was clicked, in which case `links` is an empty
  array.
</ResponseField>

<ResponseField name="totalUniqueClicks" type="number">
  Sum of every destination's `uniqueClicks`, before `limit` is applied. A
  subscriber who clicked two different links counts once for each.
</ResponseField>

<ResponseField name="totalLinks" type="number">
  Distinct destinations, before `limit` is applied.
</ResponseField>

<ResponseField name="links" type="array">
  Destinations, most unique clicks first, ties broken by total clicks. Each item
  has `url` (the destination without query string, fragment or trailing
  slash), `clicks` (every recorded click, repeats included), `uniqueClicks`
  (subscribers who clicked the destination, each counted once; recipients
  without a subscriber record count once per email) and `share` (percentage
  of `totalUniqueClicks`, rounded to two decimals).
</ResponseField>

`emailType`, `mailboxProvider`, `start`, and `end` are echoed back when you
provide them.

```bash theme={null}
curl "https://api.sequenzy.com/api/v1/metrics/links?period=30d&limit=5" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "period": "30d",
    "totalClicks": 420,
    "totalUniqueClicks": 350,
    "totalLinks": 14,
    "links": [
      {
        "url": "https://example.com/pricing",
        "clicks": 180,
        "uniqueClicks": 120,
        "share": 34.29
      },
      {
        "url": "https://example.com/blog/launch",
        "clicks": 95,
        "uniqueClicks": 80,
        "share": 22.86
      }
    ]
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "'limit' must be an integer from 1 to 50"
  }
  ```

  ```json 401 theme={null}
  {
    "success": false,
    "error": "Unauthorized"
  }
  ```

  ```json 403 theme={null}
  {
    "success": false,
    "error": "Personal API keys inherit your workspace role, and the marketer role cannot use this route (it belongs to workspace settings, integrations, or transactional email). Ask the workspace owner for admin access, or use a company API key issued for this workspace."
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.