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

# Get publication analytics

> Returns the latest saved analytics of one publication: a post published through TryPost or found on a connected channel. Take the id from `top_posts` in `GET /analytics` or from `GET /channels/{account}/insights/publications`. A publication deleted on the network or no longer available, of another workspace or of a network without analytics returns `404`.



## OpenAPI

````yaml /openapi.json get /analytics/publications/{publication}
openapi: 3.1.0
info:
  title: TryPost API
  version: 2.0.0
  description: >-
    REST API for TryPost. Authenticate with a workspace API key as a Bearer
    token.
servers:
  - url: https://app.trypost.it/api
    description: TryPost Cloud
security:
  - bearerAuth: []
tags:
  - name: Posts
    description: Create, read, update, delete and preview posts.
  - name: Post notes
    description: Internal notes on a post, visible to workspace members.
  - name: Approvals
    description: Approve or reject posts waiting for approval.
  - name: Recurrence
    description: Make a post repeat on a schedule.
  - name: Media and uploads
    description: Upload files and attach media to posts.
  - name: Social accounts
    description: Connected social accounts and their network-specific options.
  - name: Channels
    description: A channel's posting schedule and queue.
  - name: Ideas
    description: Ideas on the Create board.
  - name: Idea stages
    description: The groups (columns) of the ideas board.
  - name: Analytics
    description: Workspace and channel insights.
  - name: Labels
    description: Labels to organize posts and ideas.
  - name: Signatures
    description: Reusable text to append to posts.
  - name: Workspace
    description: The workspace the API key belongs to.
  - name: API keys
    description: Personal API keys for this workspace.
  - name: Webhooks
    description: Outgoing webhooks and their delivery logs.
  - name: Repurposes
    description: Automations that republish videos posted outside TryPost.
  - name: Platform
    description: Platform capabilities and content types.
paths:
  /analytics/publications/{publication}:
    parameters:
      - $ref: '#/components/parameters/PublicationId'
    get:
      tags:
        - Analytics
      summary: Get publication analytics
      description: >-
        Returns the latest saved analytics of one publication: a post published
        through TryPost or found on a connected channel. Take the id from
        `top_posts` in `GET /analytics` or from `GET
        /channels/{account}/insights/publications`. A publication deleted on the
        network or no longer available, of another workspace or of a network
        without analytics returns `404`.
      operationId: getPublicationAnalytics
      responses:
        '200':
          description: The publication's analytics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicationAnalytics'
              example:
                available: true
                reason: null
                publication:
                  id: 9d4a0b1c-2d3e-4f5a-8b6c-7d8e9f0a1b2c
                  post_platform_id: 9d3c1f2b-1a2b-4c3d-8e4f-5a6b7c8d9e10
                  social_account_key: 9c8b7a65-4d3e-4f2a-8b1c-0d9e8f7a6b54
                  platform: x
                  origin: trypost
                  content_type: text
                  availability: available
                  provider_published_at: '2026-10-12T14:00:03+00:00'
                  permalink: https://x.com/trypostit/status/1843921066571337728
                  excerpt: We just shipped scheduled threads.
                  preview_metadata: null
                  account_display_name: TryPost
                  account_username: trypostit
                  account_avatar_url: null
                snapshot:
                  date: '2026-10-14'
                  collected_at: '2026-10-14T06:10:00+00:00'
                  provider_observed_at: '2026-10-14T06:09:58+00:00'
                  reactions_count: 42
                  comments_count: 5
                  shares_count: 7
                  saves_count: 3
                  views_count: null
                  impressions_count: 3120
                  reach_count: null
                  engagement_count: 57
                  exposure_count: 3120
                  exposure_kind: impressions
                  watch_time_milliseconds: null
                  average_watch_time_milliseconds: null
                metrics:
                  impressions:
                    value: 3120
                    unit: count
                    time_basis: lifetime
                    precision: exact
                    availability: available
                    provider_metric: impression_count
                    period_start: null
                    period_end: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    PublicationId:
      name: publication
      in: path
      required: true
      description: >-
        Analytics publication id (`id` of a top post or of a channel post
        performance row).
      schema:
        type: string
        format: uuid
      example: 9d4a0b1c-2d3e-4f5a-8b6c-7d8e9f0a1b2c
  schemas:
    PublicationAnalytics:
      type: object
      description: >-
        Saved analytics of one publication: the latest daily snapshot collected
        from the network.
      properties:
        available:
          type: boolean
          description: Always `true` on `GET /analytics/publications/{publication}`.
        reason:
          type:
            - string
            - 'null'
          description: Always `null` on `GET /analytics/publications/{publication}`.
        publication:
          type: object
          properties:
            id:
              type: string
              format: uuid
            post_platform_id:
              type:
                - string
                - 'null'
              format: uuid
            social_account_key:
              type:
                - string
                - 'null'
            platform:
              $ref: '#/components/schemas/Platform'
            origin:
              type: string
            content_type:
              type: string
            availability:
              type: string
              enum:
                - available
                - deleted
                - unavailable
              description: >-
                Always `available` on `GET
                /analytics/publications/{publication}`.
            provider_published_at:
              type:
                - string
                - 'null'
              format: date-time
            permalink:
              type:
                - string
                - 'null'
            excerpt:
              type:
                - string
                - 'null'
            preview_metadata:
              type:
                - object
                - 'null'
            account_display_name:
              type:
                - string
                - 'null'
            account_username:
              type:
                - string
                - 'null'
            account_avatar_url:
              type:
                - string
                - 'null'
        snapshot:
          type:
            - object
            - 'null'
          properties:
            date:
              type: string
              format: date
            collected_at:
              type:
                - string
                - 'null'
              format: date-time
            provider_observed_at:
              type:
                - string
                - 'null'
              format: date-time
            reactions_count:
              type:
                - integer
                - 'null'
            comments_count:
              type:
                - integer
                - 'null'
            shares_count:
              type:
                - integer
                - 'null'
            saves_count:
              type:
                - integer
                - 'null'
            views_count:
              type:
                - integer
                - 'null'
            impressions_count:
              type:
                - integer
                - 'null'
            reach_count:
              type:
                - integer
                - 'null'
            engagement_count:
              type:
                - integer
                - 'null'
            exposure_count:
              type:
                - integer
                - 'null'
            exposure_kind:
              type:
                - string
                - 'null'
            watch_time_milliseconds:
              type:
                - integer
                - 'null'
            average_watch_time_milliseconds:
              type:
                - integer
                - 'null'
        metrics:
          type:
            - object
            - array
          description: >-
            Metrics the network reports for this publication, keyed by metric.
            An empty array `[]` when no snapshot has been collected yet. Keys
            (`reactions`, `comments`, `views`, `impressions`, `reach`,
            `engagement_rate`, ...). Each value is an object.
          additionalProperties:
            type: object
            properties:
              value:
                type:
                  - number
                  - 'null'
              unit:
                type: string
              time_basis:
                type: string
              precision:
                type: string
              availability:
                type: string
              provider_metric:
                type:
                  - string
                  - 'null'
              period_start:
                type:
                  - string
                  - 'null'
                format: date-time
              period_end:
                type:
                  - string
                  - 'null'
                format: date-time
          maxItems: 0
    Platform:
      type: string
      enum:
        - linkedin
        - linkedin-page
        - x
        - tiktok
        - youtube
        - facebook
        - instagram
        - instagram-facebook
        - threads
        - pinterest
        - bluesky
        - mastodon
        - telegram
        - discord
        - google_business
      description: >-
        Network of a social account. `linkedin-page` is a LinkedIn company page,
        `instagram-facebook` an Instagram account connected through a Facebook
        Page.
    ErrorBody:
      type: object
      properties:
        message:
          type: string
    RateLimitErrorBody:
      type: object
      properties:
        name:
          type: string
          const: rate_limit_exceeded
        message:
          type: string
          examples:
            - Rate limit exceeded. Please retry after 30 seconds.
  responses:
    Unauthorized:
      description: >-
        Missing, invalid, revoked or expired API key. Bodies: `Unauthenticated.`
        (no key, or a key that is invalid or revoked), `Token expired.` (past
        its `expires_at`), `Token not found.` and `No workspace selected.` (the
        key is no longer bound to a workspace).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            message: Unauthenticated.
    PaymentRequired:
      description: >-
        TryPost Cloud only: the workspace's account has no active subscription
        or trial. Body: `{"message": "Active subscription required."}`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            message: Active subscription required.
    Forbidden:
      description: >-
        The request is not allowed. API keys work only for workspace admins (the
        account owner or a member marked as admin): otherwise every request
        returns `Insufficient workspace permissions.`. Other bodies: `Workspace
        access denied.` (the key's user left the workspace) and `Personal access
        token required.` (an MCP OAuth token was sent) and `This action is
        unauthorized.` (the note belongs to another member).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
    NotFound:
      description: The resource does not exist in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
    TooManyRequests:
      description: 'Rate limit exceeded. Limits: 60 requests per minute per workspace.'
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RateLimitErrorBody'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Workspace API key from Settings → API Keys.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.