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

# Get unified analytics

> Flexible analytics endpoint scoped to the organization. Filter by any combination of workspaceIds, landerIds, or variantIds. The most-specific filter wins (variantIds > landerIds > workspaceIds). Returns aggregate totals plus a breakdown grouped by date / lander / variant / workspace.



## OpenAPI

````yaml https://backend-v2.landerlab.workers.dev/api/v2/openapi.json post /api/v2/organizations/{organizationId}/analytics/get
openapi: 3.1.0
info:
  title: LanderLab API
  version: 2.0.0
  description: >-
    LanderLab public API. Authenticate with an API key using the X-API-Key
    header.
servers:
  - url: https://api.landerlab.dev
    description: Production
security: []
tags:
  - name: Account
    description: >-
      Discover the organization and workspaces your API key can access. Start
      here.
  - name: Workspaces
    description: List and manage workspaces.
  - name: Landers
    description: Create, update, publish and manage landers.
  - name: A/B Testing
    description: Manage variants and split-test weights.
  - name: Editor
    description: Load and save lander content and settings.
  - name: Analytics
    description: Query unified analytics across workspaces, landers and variants.
  - name: Leads
    description: Retrieve captured leads.
  - name: Integrations
    description: Manage account-level integrations.
  - name: Lander Integrations
    description: Attach and toggle integrations on landers.
  - name: Domains
    description: Manage custom domains.
  - name: Folders
    description: Organize landers into folders.
paths:
  /api/v2/organizations/{organizationId}/analytics/get:
    post:
      tags:
        - Analytics
      summary: Get unified analytics
      description: >-
        Flexible analytics endpoint scoped to the organization. Filter by any
        combination of workspaceIds, landerIds, or variantIds. The most-specific
        filter wins (variantIds > landerIds > workspaceIds). Returns aggregate
        totals plus a breakdown grouped by date / lander / variant / workspace.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                startDate:
                  type: string
                  description: ISO 8601 date (YYYY-MM-DD)
                endDate:
                  type: string
                  description: ISO 8601 date (YYYY-MM-DD)
                timezone:
                  type: string
                  description: IANA timezone (e.g. America/New_York)
                workspaceIds:
                  type: array
                  items:
                    type: integer
                landerIds:
                  type: array
                  items:
                    type: integer
                variantIds:
                  type: array
                  items:
                    type: integer
                groupBy:
                  type: string
                  enum:
                    - date
                    - lander
                    - variant
                    - workspace
                  default: date
              required:
                - startDate
                - endDate
                - timezone
      responses:
        '200':
          description: Analytics data
          content:
            application/json:
              schema:
                type: object
                properties:
                  scope:
                    type: object
                    properties:
                      workspaceIds:
                        type: array
                        items:
                          type: number
                      landerIds:
                        type: array
                        items:
                          type: number
                      variantIds:
                        type: array
                        items:
                          type: number
                    required:
                      - workspaceIds
                      - landerIds
                      - variantIds
                    additionalProperties: false
                  groupBy:
                    type: string
                    enum:
                      - date
                      - lander
                      - variant
                      - workspace
                  totals:
                    type: object
                    properties:
                      visits:
                        type: number
                      uniqueVisits:
                        type: number
                      conversions:
                        type: number
                      clicks:
                        type: number
                      leads:
                        type: number
                      ctr:
                        type: number
                      cvr:
                        type: number
                    required:
                      - visits
                      - uniqueVisits
                      - conversions
                      - clicks
                      - leads
                      - ctr
                      - cvr
                    additionalProperties: false
                  breakdown:
                    type: array
                    items:
                      type: object
                      properties:
                        key:
                          anyOf:
                            - type: string
                            - type: number
                        label:
                          type: string
                        visits:
                          type: number
                        uniqueVisits:
                          type: number
                        conversions:
                          type: number
                        clicks:
                          type: number
                        leads:
                          type: number
                      required:
                        - key
                        - label
                        - visits
                        - uniqueVisits
                        - conversions
                        - clicks
                        - leads
                      additionalProperties: false
                required:
                  - scope
                  - totals
                  - breakdown
                additionalProperties: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key with ll_live_ prefix

````