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

# Get unified post analytics

> Returns unified post analytics. Single-post mode fetches supported platform metrics and stores snapshots; list mode reads the latest stored snapshots without provider fan-out.



## OpenAPI

````yaml /api/openapi.json get /v1/analytics
openapi: 3.1.0
info:
  title: Kavenio API
  version: 1.0.0
  license:
    name: Proprietary
    url: https://kavenio.com/terms
  description: Generated OpenAPI document for the stable Kavenio public API.
servers:
  - url: https://api.kavenio.com
security:
  - bearerAuth: []
tags:
  - name: API keys
    description: Manage Kavenio API keys for the authenticated user.
  - name: Integrations
    description: Connect automation clients and manage workflow subscriptions.
  - name: Feature requests
    description: Submit feature requests from authenticated users.
  - name: Posts
    description: Create, schedule, update, and manage post lifecycle actions.
  - name: Queue
    description: Manage reusable post queue schedules and preview slots.
  - name: Media
    description: Upload, presign, and validate media assets.
  - name: Validation
    description: Validate post payloads and platform content length limits.
  - name: Connect
    description: Start and complete account connection flows.
  - name: Accounts
    description: Manage connected social accounts and account health.
  - name: Telegram
    description: Manage Telegram-specific connected account settings.
  - name: Discord
    description: Manage Discord messages, roles, pins, events, and settings.
  - name: Google Business
    description: Manage Google Business locations, reviews, and helpers.
  - name: Ads
    description: Create, read, cancel, and inspect advertising resources.
  - name: Ad audiences
    description: Manage advertising audiences and audience members.
  - name: Ad catalogs
    description: Inspect advertising catalogs and product sets.
  - name: Ad targeting
    description: Search targeting entities and estimate audience reach.
  - name: Ad conversions
    description: Manage conversion destinations and send conversion events.
  - name: Ad leads
    description: Manage lead forms and retrieve advertising leads.
  - name: Tracking tags
    description: Manage Meta tracking tags and tag sharing.
  - name: Platform credentials
    description: Manage organization platform app credentials.
  - name: Analytics
    description: Read provider analytics and operational inbox data.
  - name: WhatsApp conversions
    description: Read and send WhatsApp conversion events.
  - name: Activity
    description: Read operational activity events.
  - name: Webhooks
    description: Manage webhook endpoints and delivery logs.
paths:
  /v1/analytics:
    get:
      tags:
        - Analytics
      summary: Get unified post analytics
      description: >-
        Returns unified post analytics. Single-post mode fetches supported
        platform metrics and stores snapshots; list mode reads the latest stored
        snapshots without provider fan-out.
      operationId: getAnalytics
      parameters:
        - in: query
          name: postId
          schema:
            type: string
            minLength: 1
        - in: query
          name: platform
          schema:
            type: string
            enum:
              - twitter
              - pinterest
              - linkedin
              - bluesky
              - mastodon
              - reddit
              - telegram
              - youtube
              - facebook
              - instagram
              - threads
              - tiktok
              - googlebusiness
              - discord
        - in: query
          name: accountId
          schema:
            type: string
            minLength: 16
            maxLength: 16
            pattern: ^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{16}$
        - in: query
          name: fromDate
          schema:
            type: string
        - in: query
          name: toDate
          schema:
            type: string
        - in: query
          name: limit
          schema:
            default: 50
            type: integer
            minimum: 1
            maximum: 100
        - in: query
          name: page
          schema:
            default: 1
            type: integer
            minimum: 1
            maximum: 9007199254740991
        - in: query
          name: sortBy
          schema:
            default: date
            type: string
            enum:
              - date
              - engagement
              - likes
              - comments
              - reposts
              - impressions
              - reach
              - clicks
              - views
              - shares
              - saves
        - in: query
          name: order
          schema:
            default: desc
            type: string
            enum:
              - asc
              - desc
      responses:
        '200':
          description: Get unified post analytics completed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    x-kavenio-const: true
                  data:
                    anyOf:
                      - type: object
                        properties:
                          postId:
                            type: string
                            minLength: 16
                            maxLength: 16
                            pattern: >-
                              ^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{16}$
                          status:
                            type: string
                            minLength: 1
                          publishedAt:
                            anyOf:
                              - type: string
                                minLength: 1
                              - type: 'null'
                          analytics:
                            type: object
                            properties:
                              likes:
                                anyOf:
                                  - type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  - type: 'null'
                              comments:
                                anyOf:
                                  - type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  - type: 'null'
                              reposts:
                                anyOf:
                                  - type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  - type: 'null'
                              quotes:
                                anyOf:
                                  - type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  - type: 'null'
                              shares:
                                anyOf:
                                  - type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  - type: 'null'
                              saves:
                                anyOf:
                                  - type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  - type: 'null'
                              impressions:
                                anyOf:
                                  - type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  - type: 'null'
                              reach:
                                anyOf:
                                  - type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  - type: 'null'
                              clicks:
                                anyOf:
                                  - type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  - type: 'null'
                              views:
                                anyOf:
                                  - type: integer
                                    minimum: 0
                                    maximum: 9007199254740991
                                  - type: 'null'
                              engagementRate:
                                anyOf:
                                  - type: number
                                    minimum: 0
                                  - type: 'null'
                              lastUpdated:
                                type: string
                                minLength: 1
                            required:
                              - likes
                              - comments
                              - reposts
                              - quotes
                              - shares
                              - saves
                              - impressions
                              - reach
                              - clicks
                              - views
                            additionalProperties: false
                          targets:
                            type: array
                            items:
                              type: object
                              properties:
                                targetId:
                                  type: string
                                  minLength: 16
                                  maxLength: 16
                                  pattern: >-
                                    ^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{16}$
                                platform:
                                  type: string
                                  enum:
                                    - twitter
                                    - pinterest
                                    - linkedin
                                    - bluesky
                                    - mastodon
                                    - reddit
                                    - telegram
                                    - youtube
                                    - facebook
                                    - instagram
                                    - threads
                                    - tiktok
                                    - googlebusiness
                                    - discord
                                accountId:
                                  type: string
                                  minLength: 16
                                  maxLength: 16
                                  pattern: >-
                                    ^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{16}$
                                platformPostId:
                                  type: string
                                  minLength: 1
                                nativeUrl:
                                  type: string
                                  format: uri
                                metrics:
                                  type: object
                                  properties:
                                    likes:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    comments:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    reposts:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    quotes:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    shares:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    saves:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    impressions:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    reach:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    clicks:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    views:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    engagementRate:
                                      anyOf:
                                        - type: number
                                          minimum: 0
                                        - type: 'null'
                                    lastUpdated:
                                      type: string
                                      minLength: 1
                                  required:
                                    - likes
                                    - comments
                                    - reposts
                                    - quotes
                                    - shares
                                    - saves
                                    - impressions
                                    - reach
                                    - clicks
                                    - views
                                  additionalProperties: false
                                unsupportedMetrics:
                                  type: array
                                  items:
                                    type: string
                                    minLength: 1
                                syncStatus:
                                  type: string
                                  enum:
                                    - synced
                                    - pending
                                    - unavailable
                                errorMessage:
                                  anyOf:
                                    - type: string
                                      minLength: 1
                                    - type: 'null'
                                fetchedAt:
                                  type: string
                                  minLength: 1
                              required:
                                - targetId
                                - platform
                                - platformPostId
                                - metrics
                                - unsupportedMetrics
                                - syncStatus
                                - errorMessage
                              additionalProperties: false
                        required:
                          - postId
                          - status
                          - publishedAt
                          - analytics
                          - targets
                        additionalProperties: false
                      - type: object
                        properties:
                          posts:
                            type: array
                            items:
                              type: object
                              properties:
                                postId:
                                  type: string
                                  minLength: 16
                                  maxLength: 16
                                  pattern: >-
                                    ^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{16}$
                                status:
                                  type: string
                                  minLength: 1
                                publishedAt:
                                  anyOf:
                                    - type: string
                                      minLength: 1
                                    - type: 'null'
                                analytics:
                                  type: object
                                  properties:
                                    likes:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    comments:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    reposts:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    quotes:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    shares:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    saves:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    impressions:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    reach:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    clicks:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    views:
                                      anyOf:
                                        - type: integer
                                          minimum: 0
                                          maximum: 9007199254740991
                                        - type: 'null'
                                    engagementRate:
                                      anyOf:
                                        - type: number
                                          minimum: 0
                                        - type: 'null'
                                    lastUpdated:
                                      type: string
                                      minLength: 1
                                  required:
                                    - likes
                                    - comments
                                    - reposts
                                    - quotes
                                    - shares
                                    - saves
                                    - impressions
                                    - reach
                                    - clicks
                                    - views
                                  additionalProperties: false
                                targets:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      targetId:
                                        type: string
                                        minLength: 16
                                        maxLength: 16
                                        pattern: >-
                                          ^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{16}$
                                      platform:
                                        type: string
                                        enum:
                                          - twitter
                                          - pinterest
                                          - linkedin
                                          - bluesky
                                          - mastodon
                                          - reddit
                                          - telegram
                                          - youtube
                                          - facebook
                                          - instagram
                                          - threads
                                          - tiktok
                                          - googlebusiness
                                          - discord
                                      accountId:
                                        type: string
                                        minLength: 16
                                        maxLength: 16
                                        pattern: >-
                                          ^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]{16}$
                                      platformPostId:
                                        type: string
                                        minLength: 1
                                      nativeUrl:
                                        type: string
                                        format: uri
                                      metrics:
                                        type: object
                                        properties:
                                          likes:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                              - type: 'null'
                                          comments:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                              - type: 'null'
                                          reposts:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                              - type: 'null'
                                          quotes:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                              - type: 'null'
                                          shares:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                              - type: 'null'
                                          saves:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                              - type: 'null'
                                          impressions:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                              - type: 'null'
                                          reach:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                              - type: 'null'
                                          clicks:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                              - type: 'null'
                                          views:
                                            anyOf:
                                              - type: integer
                                                minimum: 0
                                                maximum: 9007199254740991
                                              - type: 'null'
                                          engagementRate:
                                            anyOf:
                                              - type: number
                                                minimum: 0
                                              - type: 'null'
                                          lastUpdated:
                                            type: string
                                            minLength: 1
                                        required:
                                          - likes
                                          - comments
                                          - reposts
                                          - quotes
                                          - shares
                                          - saves
                                          - impressions
                                          - reach
                                          - clicks
                                          - views
                                        additionalProperties: false
                                      unsupportedMetrics:
                                        type: array
                                        items:
                                          type: string
                                          minLength: 1
                                      syncStatus:
                                        type: string
                                        enum:
                                          - synced
                                          - pending
                                          - unavailable
                                      errorMessage:
                                        anyOf:
                                          - type: string
                                            minLength: 1
                                          - type: 'null'
                                      fetchedAt:
                                        type: string
                                        minLength: 1
                                    required:
                                      - targetId
                                      - platform
                                      - platformPostId
                                      - metrics
                                      - unsupportedMetrics
                                      - syncStatus
                                      - errorMessage
                                    additionalProperties: false
                              required:
                                - postId
                                - status
                                - publishedAt
                                - analytics
                                - targets
                              additionalProperties: false
                          overview:
                            type: object
                            properties:
                              totalPosts:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              lastSyncedAt:
                                anyOf:
                                  - type: string
                                    minLength: 1
                                  - type: 'null'
                            required:
                              - totalPosts
                              - lastSyncedAt
                            additionalProperties: false
                          pagination:
                            type: object
                            properties:
                              page:
                                type: integer
                                minimum: 1
                                maximum: 9007199254740991
                              limit:
                                type: integer
                                minimum: 1
                                maximum: 9007199254740991
                              total:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                              pages:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                            required:
                              - page
                              - limit
                              - total
                              - pages
                            additionalProperties: false
                        required:
                          - posts
                          - overview
                          - pagination
                        additionalProperties: false
                required:
                  - ok
                  - data
                additionalProperties: false
        '401':
          description: Authentication failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    x-kavenio-const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - ok
                  - error
                additionalProperties: false
        '422':
          description: Request validation failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    x-kavenio-const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - ok
                  - error
                additionalProperties: false
        '500':
          description: Request failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    x-kavenio-const: false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        minLength: 1
                      message:
                        type: string
                        minLength: 1
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - ok
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Clerk session or OAuth token

````