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

# LinkedIn post analytics

> Retrieve post analytics for a LinkedIn profile within a date range. When a post was published from Ordinal, the response includes an ordinalPost object with the linked post's id, title, labels, and campaign.

**Click metrics by profile type:**
- Personal (member) profiles return `linkClickCount`, `profileViewFromContentCount`, `premiumCtaClickCount`, and `followerGainedFromContentCount`. `clickCount` is always null.
- Organization (company page) profiles return `clickCount` for total post clicks. The four member-only fields above are always null.

Personal profiles also include `saveCount` (times the post was saved) and `sendCount` (times the post was sent via DM). Posts with type `Video` also include `videoViewCount`, `videoViewerCount`, and `videoWatchTimeSeconds`; these fields are null for non-video posts and for video posts that have not yet been synced.



## OpenAPI

````yaml /api/openapi.json get /analytics/linkedin/{profileId}/posts
openapi: 3.1.0
info:
  title: Ordinal API
  version: 1.0.0
  description: API to create and manage Ordinal workspaces, posts, profiles, and analytics
servers:
  - url: https://app.tryordinal.com/api/v1
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Analytics
    description: Social media analytics data
  - name: Approvals
    description: Post approval workflows
  - name: Comments
    description: >-
      Post comments for team collaboration. Supports @mentions using the format
      @[Display Name](userId).
  - name: Engagements
    description: Team engagements for posts (likes, comments, reposts)
  - name: Invites
    description: Workspace invitations for adding new users
  - name: Labels
    description: Labels for organizing posts
  - name: Instagram
    description: Instagram utilities for location search and tagging
  - name: LinkedIn
    description: LinkedIn utilities for profile lookups, tagging, and mentions
  - name: Posts
    description: Create and manage posts
  - name: Profiles
    description: List connected social profiles
  - name: Slack Boosts
    description: >-
      List connected Slack channels (webhooks), then create and manage slack
      boosts so teams get notified in Slack when posts publish. Requires Slack
      connected with marketing boost channels.
  - name: Subscribers
    description: Post subscribers for notifications
  - name: File Uploads
    description: >-
      Upload files from URLs for use in posts. Supports images (JPEG, PNG, GIF,
      WebP) up to 10 MB and videos (MP4, MOV) up to 350 MB.
  - name: Ideas
    description: >-
      Create and manage content ideas. Ideas are draft posts without scheduled
      dates that can be converted to calendar posts.
  - name: Inline Comments
    description: >-
      Text-anchored comments on specific post content. Read-only API for
      retrieving inline comments across channels.
  - name: Users
    description: Workspace users
  - name: Webhooks
    description: >-
      Create, list, get, update, and delete webhooks to receive real-time event
      notifications
  - name: Workspaces
    description: Workspace information
paths:
  /analytics/linkedin/{profileId}/posts:
    get:
      tags:
        - Analytics
      summary: LinkedIn post analytics
      description: >-
        Retrieve post analytics for a LinkedIn profile within a date range. When
        a post was published from Ordinal, the response includes an ordinalPost
        object with the linked post's id, title, labels, and campaign.


        **Click metrics by profile type:**

        - Personal (member) profiles return `linkClickCount`,
        `profileViewFromContentCount`, `premiumCtaClickCount`, and
        `followerGainedFromContentCount`. `clickCount` is always null.

        - Organization (company page) profiles return `clickCount` for total
        post clicks. The four member-only fields above are always null.


        Personal profiles also include `saveCount` (times the post was saved)
        and `sendCount` (times the post was sent via DM). Posts with type
        `Video` also include `videoViewCount`, `videoViewerCount`, and
        `videoWatchTimeSeconds`; these fields are null for non-video posts and
        for video posts that have not yet been synced.
      operationId: analytics-linkedin-posts
      parameters:
        - name: profileId
          in: path
          required: true
          description: LinkedIn profile ID (UUID)
          schema:
            type: string
            format: uuid
        - name: startDate
          in: query
          description: Start date for analytics (defaults to 30 days ago)
          schema:
            type: string
            format: date
        - name: endDate
          in: query
          description: End date for analytics (defaults to today)
          schema:
            type: string
            format: date
      responses:
        '200':
          description: LinkedIn post analytics
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/LinkedInPostAnalytics'
              example:
                - id: 550e8400-e29b-41d4-a716-446655440600
                  url: >-
                    https://www.linkedin.com/feed/update/urn:li:share:7123456789012345678
                  commentary: >-
                    Excited to share our latest product update! 🚀


                    After months of development, we're launching three new
                    features that will transform how you work:


                    ✅ Feature A

                    ✅ Feature B

                    ✅ Feature C


                    Learn more in the comments 👇
                  type: Text
                  publishedAt: '2024-12-10T14:00:00.000Z'
                  likeCount: 245
                  commentCount: 32
                  shareCount: 18
                  clickCount: 156
                  linkClickCount: null
                  profileViewFromContentCount: null
                  premiumCtaClickCount: null
                  followerGainedFromContentCount: null
                  saveCount: 41
                  sendCount: 12
                  impressionCount: 12500
                  engagement: 0.036
                  emv: 375
                  ordinalPost:
                    id: 44444444-4444-4444-a444-444444444444
                    title: LinkedIn Ordinal Post
                    labels:
                      - name: Product
                        labelId: 55555555-5555-4555-a555-555555555555
                    campaign:
                      id: 66666666-6666-4666-a666-666666666666
                      name: Launch Campaign
                - id: 550e8400-e29b-41d4-a716-446655440601
                  url: >-
                    https://www.linkedin.com/feed/update/urn:li:share:7123456789012345679
                  commentary: >-
                    5 lessons learned from scaling our startup from 0 to 10k
                    users 📈


                    Watch the full breakdown:
                  type: Video
                  publishedAt: '2024-12-05T09:30:00.000Z'
                  likeCount: 892
                  commentCount: 67
                  shareCount: 134
                  clickCount: null
                  linkClickCount: 312
                  profileViewFromContentCount: 87
                  premiumCtaClickCount: 5
                  followerGainedFromContentCount: 24
                  saveCount: 156
                  sendCount: 48
                  impressionCount: 28900
                  engagement: 0.052
                  emv: 867
                  videoViewCount: 15420
                  videoViewerCount: 12800
                  videoWatchTimeSeconds: 82340
                  ordinalPost: null
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    LinkedInPostAnalytics:
      type: object
      required:
        - id
        - url
        - type
      properties:
        id:
          type: string
          format: uuid
        url:
          type: string
          format: uri
          description: LinkedIn post URL
        commentary:
          type: string
          nullable: true
        type:
          type: string
          enum:
            - Text
            - Article
            - Image
            - Video
            - Poll
            - Celebration
            - Job
            - Event
            - Document
            - Repost
            - QuotePost
            - MultiImage
          description: The type of LinkedIn post
        publishedAt:
          type: string
          format: date-time
          nullable: true
        likeCount:
          type: integer
          nullable: true
        commentCount:
          type: integer
          nullable: true
        shareCount:
          type: integer
          nullable: true
        clickCount:
          type: integer
          nullable: true
          description: >-
            Total post clicks. Available for organization (company page)
            profiles only; null for personal profiles.
        linkClickCount:
          type: integer
          nullable: true
          description: >-
            Clicks on links embedded in the post. Available for personal
            LinkedIn profiles only; null for organization profiles.
        profileViewFromContentCount:
          type: integer
          nullable: true
          description: >-
            Profile views driven by this post. Available for personal LinkedIn
            profiles only; null for organization profiles.
        premiumCtaClickCount:
          type: integer
          nullable: true
          description: >-
            Clicks on LinkedIn Premium CTAs (for example, Book an appointment)
            attached to the post. Available for personal LinkedIn profiles only;
            null for organization profiles.
        followerGainedFromContentCount:
          type: integer
          nullable: true
          description: >-
            New followers attributed to this post. Available for personal
            LinkedIn profiles only; null for organization profiles.
        saveCount:
          type: integer
          nullable: true
          description: >-
            Times the post was saved to view later. Available for personal
            LinkedIn profiles only.
        sendCount:
          type: integer
          nullable: true
          description: >-
            Times the post was sent via direct message. Available for personal
            LinkedIn profiles only.
        impressionCount:
          type: integer
          nullable: true
        engagement:
          type: number
          nullable: true
          description: >-
            Engagement rate (total engagements / impressions), typically between
            0 and 1
        emv:
          type: number
          nullable: true
          description: Earned Media Value calculated as (impressionCount / 1000) * CPM
        videoViewCount:
          type: integer
          nullable: true
          description: >-
            Total views on a video post. Only populated for posts with type
            `Video`; null for non-video posts and video posts that have not yet
            been synced.
        videoViewerCount:
          type: integer
          nullable: true
          description: >-
            Unique viewers of a video post. Only populated for posts with type
            `Video`; null for non-video posts and video posts that have not yet
            been synced.
        videoWatchTimeSeconds:
          type: integer
          nullable: true
          description: >-
            Total watch time across all viewers, in whole seconds. Only
            populated for posts with type `Video`; null for non-video posts and
            video posts that have not yet been synced.
        ordinalPost:
          oneOf:
            - $ref: '#/components/schemas/OrdinalPostReference'
            - type: 'null'
          description: >-
            Linked Ordinal post when this external post was published from
            Ordinal, null otherwise
    OrdinalPostReference:
      type: object
      description: Reference to the Ordinal post linked to an external social post
      required:
        - id
        - title
        - labels
      properties:
        id:
          type: string
          format: uuid
          description: Ordinal post ID
        title:
          type: string
          description: Ordinal post title
        labels:
          type: array
          items:
            type: object
            required:
              - name
              - labelId
            properties:
              name:
                type: string
                description: Label name
              labelId:
                type: string
                format: uuid
                description: Label ID
        campaign:
          type: object
          nullable: true
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
    Error:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
  responses:
    Unauthorized:
      description: Unauthorized - Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: UNAUTHORIZED
            message: Invalid or unauthorized API key
    Forbidden:
      description: Forbidden - Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: FORBIDDEN
            message: Engagement profiles cannot be used for analytics
    NotFound:
      description: Not Found - Resource does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: NOT_FOUND
            message: Post not found or does not belong to this workspace
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication. Generate an API key from your workspace
        settings.

````

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