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

# List short link metrics

> Returns per-click metrics for short links, including device, location, and campaign attribution, within the requested date range.



## OpenAPI

````yaml https://wavix.github.io/wavix-openapi/wavix-api.yaml get /v1/short-links/metrics
openapi: 3.1.0
info:
  title: Wavix APIs
  description: >-
    Wavix provides robust APIs that let you integrate voice and text messaging
    features directly into your app. Send text, place calls, and access detailed
    reports  programmatically.
  termsOfService: https://wavix.com/terms-and-conditions
  license:
    name: MIT
    identifier: MIT
  contact:
    name: Wavix
    url: https://wavix.com
    email: support@wavix.com
  version: '1.0'
servers:
  - url: https://api.wavix.com
    description: https://api.wavix.com
    variables: {}
security:
  - bearerAuth: []
tags:
  - name: SIP trunks
    description: SIP trunks
  - name: Buy
    description: Numbers
  - name: Cart
    description: Numbers
  - name: My numbers
    description: Numbers
  - name: Billing
    description: Billing, transactions, and invoices
  - name: Profile
    description: Account profile and customer information
  - name: CDRs
    description: Call detail records and call history
  - name: Speech Analytics
    description: Call transcription and speech analytics
  - name: SMS and MMS
    description: Messaging
  - name: Number Validator
    description: Phone number validation
  - name: Link shortener
    description: Short link and click metrics
  - name: 2FA
    description: Two-factor authentication
  - name: 10DLC
    description: 10DLC Campaigns and Brands
  - name: API Keys
    description: API key management
  - name: Call webhooks
    description: Webhook configuration for call events
  - name: Call control
    description: Programmable Voice
  - name: Call streaming
    description: Real-time call audio streaming over WebSocket
  - name: Call recording
    description: Call recording
  - name: Sub-accounts
    description: Sub-account management
  - name: Voice campaigns
    description: Outbound voice campaigns
  - name: Wavix Embeddable
    description: WebRTC embeddable widget
paths:
  /v1/short-links/metrics:
    get:
      tags:
        - Link shortener
      summary: List short link metrics
      description: >-
        Returns per-click metrics for short links, including device, location,
        and campaign attribution, within the requested date range.
      operationId: link_shortener_metrics_list
      parameters:
        - name: from
          in: query
          description: Start of the date range to query, in `YYYY-MM-DD` format. Inclusive.
          required: true
          style: form
          explode: true
          schema:
            type: string
            format: date
            example: '2023-05-01'
        - name: to
          in: query
          description: End of the date range to query, in `YYYY-MM-DD` format. Inclusive.
          required: true
          style: form
          explode: true
          schema:
            type: string
            format: date
            example: '2023-05-31'
        - name: phone
          in: query
          description: >-
            Filters metrics by the phone number associated with the click, in
            E.164 format.
          style: form
          explode: true
          schema:
            type: string
            example: '1872025555'
        - name: utm_campaign
          in: query
          description: Filters metrics by `utm_campaign` name.
          style: form
          explode: true
          schema:
            type: string
            example: summer
        - name: page
          in: query
          description: Page number to retrieve. Default `1`.
          style: form
          explode: true
          schema:
            type: integer
            format: int32
            example: 1
        - name: per_page
          in: query
          description: Number of records to return per page. Default `25`.
          style: form
          explode: true
          schema:
            type: integer
            format: int32
            example: 25
      responses:
        '200':
          description: Returns a paginated list of short link metrics.
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/ShortLinkMetricsResponse'
              examples:
                success:
                  summary: Successful response
                  value:
                    metrics:
                      - latitude: 59.3247
                        longitude: 18.056
                        operating_system: Mac OS X 10.15
                        browser: Firefox
                        language: English
                        phone: '12762025555'
                        utm_campaign: summer
                        created_at: '2023-07-19 18:23:42.120Z'
                        link_hash: hd82Jhs21
                        user_id: 100017
                    pagination:
                      current_page: 2
                      per_page: 25
                      total: 101
                      total_pages: 5
        '400':
          $ref: '#/components/responses/BadRequestErrorResponse'
        '403':
          $ref: '#/components/responses/ForbiddenErrorResponse'
      deprecated: false
      security:
        - bearerAuth:
            - campaigns:read
components:
  schemas:
    ShortLinkMetricsResponse:
      title: ShortLinkMetricsResponse
      required:
        - metrics
        - pagination
      type: object
      additionalProperties: false
      properties:
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/ShortLinkMetricsItem'
          description: List of short link metrics matching search criteria.
        pagination:
          $ref: '#/components/schemas/Pagination'
    ShortLinkMetricsItem:
      title: ShortLinkMetricsItem
      required:
        - latitude
        - longitude
        - operating_system
        - browser
        - language
        - phone
        - utm_campaign
        - created_at
        - user_id
        - link_hash
      type: object
      additionalProperties: false
      properties:
        latitude:
          type:
            - number
            - 'null'
          description: |-
            Latitude of the location derived from the IP address
             used to open the short link.
          example: 59.3247
        longitude:
          type:
            - number
            - 'null'
          description: |-
            Longitude of the location derived from the IP address
             used to open the short link.
          example: 18.056
        operating_system:
          type:
            - string
            - 'null'
          description: Operating system of the device that opened the short link.
          example: Mac OS X 10.15
        browser:
          type:
            - string
            - 'null'
          description: Browser used to open the short link.
          example: Firefox
        language:
          type:
            - string
            - 'null'
          description: Browser language preference.
          example: English
        phone:
          type:
            - string
            - 'null'
          description: Phone number associated with the short link.
          example: '12762025555'
        utm_campaign:
          type:
            - string
            - 'null'
          description: UTM campaign name associated with the short link.
          example: summer
        created_at:
          type: string
          description: Date and time when short link was opened.
          example: '2023-07-19 18:23:42.120Z'
        link_hash:
          type: string
          description: Hash of the short link.
          example: hd82Jhs21
        user_id:
          type: integer
          description: Account ID.
          example: 100017
    Pagination:
      title: Pagination
      required:
        - current_page
        - per_page
        - total
        - total_pages
      type: object
      additionalProperties: false
      properties:
        current_page:
          type: integer
          description: Current page number.
          format: int32
          example: 2
        per_page:
          type: integer
          description: Number of records per page.
          format: int32
          example: 25
        total:
          type: integer
          description: Total number of records.
          format: int32
          example: 101
        total_pages:
          type: integer
          description: Total number of pages.
          format: int32
          example: 5
    ValidationErrorResponse:
      title: ValidationErrorResponse
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Indicates whether the request was successful. Always `false` for
            this error.
          example: false
        message:
          type: string
          description: >-
            Human-readable description naming the missing or invalid request
            parameter.
          example: Missing or invalid parameter <param_name>
    ForbiddenErrorResponse:
      title: ForbiddenErrorResponse
      type: object
      properties:
        success:
          type: boolean
          description: >-
            Indicates whether the request was successful. Always `false` for
            this error.
          example: false
        message:
          type: string
          description: Human-readable description of why access is forbidden.
          example: The service is not provisioned for your account.
  responses:
    BadRequestErrorResponse:
      description: Request failed. Missing or invalid parameter <param_name>
      headers: {}
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorResponse'
    ForbiddenErrorResponse:
      description: Request failed. The feature is disabled for your account.
      headers: {}
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForbiddenErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Wavix API key. Pass as `Authorization: Bearer <api_key>`. Keys support
        per-resource scopes (none / read / write). See [Restricted keys and
        scopes](https://docs.wavix.com/api-reference/authentication#restricted-keys-and-scopes).

````