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

# Get organization link analytics



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/links/analytics
openapi: 3.1.0
info:
  title: Nautilus Public API
  version: 1.0.0
  description: >-
    Tenant-scoped public API. Except for /api/v1/openapi.json, requests use a
    Clerk tenant API key as a Bearer token. The key's organizationId is the sole
    tenant scope; organization IDs supplied by callers are never accepted.
    Detail endpoints deliberately return 404 for both missing and cross-tenant
    records. Canonical collections use the standard envelope and endpoint-bound
    cursor pagination. Timestamps are UTC ISO 8601 values and monetary amounts
    ending in Cents are integer cents. Responses use narrow serializers and
    exclude credentials, API keys, provider configuration, access tokens,
    webhook secrets, raw provider payloads, and internal workflow or activity
    data.
servers:
  - url: https://app.nautilus.co
security:
  - tenantApiKey: []
tags:
  - name: Contract
  - name: Cancellations
  - name: Sites
  - name: Products
  - name: Checkout links
  - name: Purchases
  - name: Contact lists
  - name: Contacts
  - name: Marketing
  - name: Forms
  - name: Vouchers
  - name: Links
  - name: Automations
  - name: Surveys
  - name: Cases
  - name: Sonny's POS
  - name: Analytics
  - name: Messaging
  - name: Legacy
    description: Deprecated noncanonical endpoints retained for compatibility.
paths:
  /api/v1/links/analytics:
    get:
      tags:
        - Links
      summary: Get organization link analytics
      operationId: getLinkAnalytics
      parameters:
        - name: event
          in: query
          required: false
          schema:
            type: string
            enum:
              - clicks
              - leads
              - sales
              - composite
            default: clicks
        - name: groupBy
          in: query
          required: false
          schema:
            type: string
            enum:
              - count
              - timeseries
              - top_links
              - top_urls
              - referers
              - referer_urls
              - countries
              - regions
              - cities
              - devices
              - browsers
              - os
              - utm_sources
              - utm_mediums
              - utm_campaigns
            default: timeseries
        - name: interval
          in: query
          required: false
          schema:
            type: string
            enum:
              - 24h
              - 7d
              - 30d
              - 90d
              - 1y
              - mtd
              - qtd
              - ytd
              - all
            default: 30d
          description: Preset interval used only when start is omitted.
        - name: start
          in: query
          required: false
          schema:
            type: string
          description: Inclusive UTC date or timestamp. Overrides interval.
        - name: end
          in: query
          required: false
          schema:
            type: string
          description: Inclusive UTC date or timestamp; requires start.
      responses:
        '200':
          description: Tenant-scoped resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkAnalytics'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '502':
          $ref: '#/components/responses/BadGateway'
components:
  schemas:
    LinkAnalytics:
      type: object
      additionalProperties: false
      properties:
        event:
          type: string
          enum:
            - clicks
            - leads
            - sales
            - composite
        groupBy:
          type: string
          enum:
            - count
            - timeseries
            - top_links
            - top_urls
            - referers
            - referer_urls
            - countries
            - regions
            - cities
            - devices
            - browsers
            - os
            - utm_sources
            - utm_mediums
            - utm_campaigns
        range:
          anyOf:
            - type: object
              additionalProperties: false
              properties:
                interval:
                  type: string
              required:
                - interval
            - type: object
              additionalProperties: false
              properties:
                start:
                  type: string
                  format: date-time
                  description: UTC ISO 8601 timestamp.
                end:
                  anyOf:
                    - type: string
                      format: date-time
                      description: UTC ISO 8601 timestamp.
                    - type: 'null'
              required:
                - start
                - end
        linkId:
          type: string
        data:
          anyOf:
            - type: object
              additionalProperties: true
            - type: array
              items:
                type: object
                additionalProperties: true
          description: >-
            Sanitized count or grouped rows. Count fields and saleAmountCents
            are integers; provider configuration and internal link fields are
            excluded.
      required:
        - event
        - groupBy
        - range
        - data
    Error:
      type: object
      additionalProperties: false
      properties:
        error:
          type: string
      required:
        - error
  responses:
    BadRequest:
      description: >-
        Malformed parameters, unsupported provider, or unavailable resource for
        this organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing, invalid, legacy, or non-tenant Bearer credential.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error. No internal exception data is exposed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadGateway:
      description: An upstream service required by the endpoint is unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    tenantApiKey:
      type: http
      scheme: bearer
      bearerFormat: Clerk tenant API key
      description: >-
        Clerk tenant API key. The organizationId encoded by the key is the exact
        and only tenant scope.

````