Skip to main content
GET
/
v1
/
short-links
/
{id}
/
analytics
Analytics agregados
curl --request GET \
  --url https://api.notifique.dev/v1/short-links/{id}/analytics \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "granularity": "day",
    "range": {
      "start": "2026-04-13T00:00:00.000Z",
      "end": "2026-04-20T23:59:59.999Z"
    },
    "series": [
      {
        "bucketStart": "2026-04-13T00:00:00.000Z",
        "clicksTotal": 5
      },
      {
        "bucketStart": "2026-04-14T00:00:00.000Z",
        "clicksTotal": 12
      },
      {
        "bucketStart": "2026-04-15T00:00:00.000Z",
        "clicksTotal": 8
      }
    ],
    "breakdown": {
      "country": [
        {
          "key": "BR",
          "clicks": 20
        },
        {
          "key": "US",
          "clicks": 3
        },
        {
          "key": "(unknown)",
          "clicks": 2
        }
      ],
      "deviceType": [
        {
          "key": "mobile",
          "clicks": 18
        },
        {
          "key": "desktop",
          "clicks": 7
        }
      ]
    }
  }
}

Authorizations

Authorization
string
header
required

API Key no header Authorization. Exemplo: Authorization: Bearer sk_live_xxxxx

Path Parameters

id
string
required

ID (cuid) do link.

Query Parameters

granularity
enum<string>

Agregação temporal. Qualquer valor que não seja day é tratado como hour.

Available options:
hour,
day
start
string<date-time>

Início do intervalo (inclusive), ISO 8601.

end
string<date-time>

Fim do intervalo (inclusive), ISO 8601.

Response

Analytics no intervalo solicitado.

success
boolean
required
Example:

true

data
object
required