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

# Retrieve analytics

> Retrieve analytics for the authenticated workspace.



## OpenAPI

````yaml GET /workspaces/{url}/analytics/stats
openapi: 3.0.0
info:
  title: Reqlick API
  version: 1.0.0
  description: Reqlick API Documentation
servers:
  - url: https://api.reqlick.com
security:
  - bearerAuth: []
tags:
  - name: Documents
    description: Documents management
  - name: Domains
    description: Domains management
  - name: GoogleAuth
    description: Google Authentication
  - name: Links
    description: Links management
  - name: Payments
    description: Payments management
  - name: QRCodes
    description: QR Codes management
  - name: Resources
    description: Resources management
  - name: Subscriptions
    description: Subscription management
  - name: Users
    description: User management and authentication
  - name: Workspaces
    description: Workspaces management
paths:
  /workspaces/{url}/analytics/stats:
    get:
      tags:
        - Workspaces
      summary: Get workspace statistics and analytics
      parameters:
        - name: url
          in: path
          required: true
          schema:
            type: string
        - name: linkId
          in: query
          required: false
          schema:
            type: string
        - name: documentId
          in: query
          required: false
          schema:
            type: string
        - name: startDate
          in: query
          required: false
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          required: false
          schema:
            type: string
            format: date
        - name: selector
          in: query
          required: true
          schema:
            type: string
            default: countries
            enum:
              - country
              - region
              - city
      responses:
        '200':
          description: Successfully retrieved workspace statistics and analytics data
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  accessToken:
                    type: string
                    example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
                  refreshToken:
                    type: string
                    example: def50200b1c7c2f703...
                  lastWorkspaceViewed:
                    type: string
                    example: /my-workspace-url
                  userStatistics:
                    type: object
                    properties:
                      views:
                        type: array
                        items:
                          type: object
                          properties:
                            _id:
                              type: string
                              example: 1110580a82031111aaa03333
                            linkId:
                              type: string
                              example: 1110580a82031111aaa02222
                            projectId:
                              type: string
                              example: 1110580a82031111aaa1111
                            viewedAt:
                              type: string
                              format: date-time
                              example: '2024-01-05T12:45:39.752Z'
                            isBot:
                              type: boolean
                              example: false
                            projectDetails:
                              type: object
                              properties:
                                _id:
                                  type: string
                                  example: 1110580a82031111aaa03333
                                name:
                                  type: string
                                  example: Reqlick
                                url:
                                  type: string
                                  example: reqlick-url
                                createdAt:
                                  type: string
                                  format: date-time
                                  example: '2024-06-05T12:20:26.768Z'
                                viewedAt:
                                  type: string
                                  format: date-time
                                  example: '2024-07-20T11:29:13.050Z'
                                updatedAt:
                                  type: string
                                  format: date-time
                                  example: '2024-07-20T11:29:13.051Z'
                                isArchived:
                                  type: boolean
                                  example: false
                                subscriptionId:
                                  type: string
                                  example: 1110580a82031111aaa03333
                                logo:
                                  type: string
                                  example: logo.png
                            memberDetails:
                              type: object
                              properties:
                                _id:
                                  type: string
                                  example: 1110580a82031111aaa03333
                                userId:
                                  type: string
                                  example: 1110580a82031111aaa03333
                                role:
                                  type: string
                                  example: MEMBER
                                expires:
                                  type: string
                                  example: null
                                projectId:
                                  type: string
                                  example: 1110580a82031111aaa03333
                                status:
                                  type: string
                                  example: ACCEPTED
                                createdAt:
                                  type: string
                                  format: date-time
                                  example: '2024-01-27T16:02:58.964Z'
                                updatedAt:
                                  type: string
                                  format: date-time
                                  example: '2024-01-27T16:23:52.596Z'
                                email:
                                  type: string
                                  example: null
                            link:
                              type: object
                              properties:
                                _id:
                                  type: string
                                  example: 1110580a82031111aaa03333
                                url:
                                  type: string
                                  example: >-
                                    https://www.reqlick.com/watch?v=q-9EDv_quno&utm_source=social&utm_medium=social&utm_campaign=1st%20campaign&utm_term=digital&utm_content=marketing&ref=facebook
                                key:
                                  type: string
                                  example: Y203
                                expiresAt:
                                  type: string
                                  format: date-time
                                  example: '2024-01-05T12:46:00.000Z'
                                password:
                                  type: string
                                  example: my-password
                                proxy:
                                  type: boolean
                                  example: false
                                isFile:
                                  type: boolean
                                  example: false
                                isQR:
                                  type: boolean
                                  example: false
                                title:
                                  type: string
                                  example: Reqlick Title
                                description:
                                  type: string
                                  example: Reqlick Description
                                image:
                                  type: string
                                  example: /file/logo.png
                                createdAt:
                                  type: string
                                  format: date-time
                                  example: '2024-06-05T12:29:34.244Z'
                                updatedAt:
                                  type: string
                                  format: date-time
                                  example: '2024-06-13T12:56:48.323Z'
                                projectId:
                                  type: string
                                  example: 6660580a43f1a356b97f64b9
                                isPublic:
                                  type: boolean
                                  example: true
                                isActive:
                                  type: boolean
                                  example: false
                                isArchived:
                                  type: boolean
                                  example: false
                                isRecord:
                                  type: boolean
                                  example: false
                                domain:
                                  type: string
                                  example: rqk.sh
                                ios:
                                  type: string
                                  example: https://reqlick.com/install/ios
                                android:
                                  type: string
                                  example: https://reqlick.com/install/android
                            viewData:
                              type: object
                              properties:
                                _id:
                                  type: string
                                  example: 1110580a82031111aaa03333
                                viewId:
                                  type: string
                                  example: 1110580a82031111aaa03333
                                h_userAgent:
                                  type: string
                                  example: >-
                                    Mozilla/5.0 (Windows NT 10.0; Win64; x64)
                                    AppleWebKit/537.36 (KHTML, like Gecko)
                                    Chrome/125.0.0.0 Safari/537.36
                                h_referer:
                                  type: string
                                  example: https://rqk.sh/Y211
                                h_acceptLanguage:
                                  type: string
                                  example: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
                                h_sec_ch_ua_platform:
                                  type: string
                                  example: Windows
                                sessionId:
                                  type: string
                                  example: 5fa8e79f-1111-586a-2222-0b50220b4094
                                b_screen:
                                  type: object
                                b_screen_width:
                                  type: integer
                                  example: 1920
                                b_screen_height:
                                  type: integer
                                  example: 1080
                                b_navigator:
                                  type: object
                                b_history:
                                  type: object
                                b_hostname:
                                  type: string
                                  example: rqk.sh
                                b_pathname:
                                  type: string
                                  example: /Y2111
                                b_language:
                                  type: string
                                  example: en
                                b_user_agent:
                                  type: string
                                  example: >-
                                    Mozilla/5.0 (Windows NT 10.0; Win64; x64)
                                    AppleWebKit/537.36 (KHTML, like Gecko)
                                    Chrome/125.0.0.0 Safari/537.36
        '401':
          description: Authentication Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Authentication Error
                  feedback:
                    type: string
                    example: You are unauthenticated!
        '500':
          description: Internal server error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````