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

# LinkedIn results for a period

> The person's LinkedIn account results (personal profile or company page) over whole days ending yesterday, with the period before for comparison, like CaptureFlow's Analytics page. Analytics belong to whoever connected LinkedIn in the workspace: owners and admins read a member's with as_user. Numbers are up to a day old (`as_of`); a missing day is null, never an estimate.



## OpenAPI

````yaml /openapi.json get /analytics
openapi: 3.1.0
info:
  title: CaptureFlow API
  version: 1.0.0
  description: >-
    Read and create content in CaptureFlow. Scheduling and posting always go
    through an approval the user accepts in CaptureFlow: the API never publishes
    on its own (POST /posts/{id}/proposals, then the user accepts at
    `approval_url`).


    Authenticate with an API key from Settings > API & MCP (`Authorization:
    Bearer cf_live_...`), or as an app the user connected through OAuth 2.1
    (`Authorization: Bearer cfo_at_...`; PKCE, discovery at
    `/.well-known/oauth-protected-resource`). Both act for their user; pass
    `workspace_id` when the user belongs to several workspaces. Owners and
    admins can act for a member with `as_user` (ids from GET /members).


    The same operations are tools of the MCP server at
    https://mcp.captureflow.ai/mcp (read-only:
    https://mcp.captureflow.ai/mcp/readonly).


    Errors: https://docs.captureflow.ai/api/errors
servers:
  - url: https://api.captureflow.ai/v1
security:
  - apiKey: []
  - oauth2: []
tags:
  - name: Account
    description: Who the key or app acts for, and the workspaces it can use.
  - name: Ideas
    description: 'Content ideas: the topics posts are written about.'
  - name: Inputs
    description: Source material (text, links, files) that posts are made from.
  - name: Posts
    description: >-
      Draft posts, platform checks and proposals the user accepts in
      CaptureFlow.
  - name: Comments
    description: Review comments on posts, and the new ones since your last check.
  - name: Analytics
    description: 'LinkedIn results: account totals for a period and each post''s numbers.'
  - name: Social accounts
    description: The social accounts connected in the workspace.
  - name: Strategy
    description: The workspace content strategy.
  - name: Content agent
    description: >-
      Runs of the content agent that writes drafts from an idea, an input or
      text.
  - name: Meta
    description: Service status.
paths:
  /analytics:
    get:
      tags:
        - Analytics
      summary: LinkedIn results for a period
      description: >-
        The person's LinkedIn account results (personal profile or company page)
        over whole days ending yesterday, with the period before for comparison,
        like CaptureFlow's Analytics page. Analytics belong to whoever connected
        LinkedIn in the workspace: owners and admins read a member's with
        as_user. Numbers are up to a day old (`as_of`); a missing day is null,
        never an estimate.
      operationId: get_analytics
      parameters:
        - in: query
          name: workspace_id
          schema:
            description: >-
              The workspace to act in (ids from list_workspaces). Optional when
              the key or app has a default or a lock, or you belong to one
              workspace.
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: >-
            The workspace to act in (ids from list_workspaces). Optional when
            the key or app has a default or a lock, or you belong to one
            workspace.
        - in: query
          name: as_user
          schema:
            description: >-
              Owners and admins only: act as this member of the workspace, like
              View As (user ids from list_members). Every use is audited.
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: >-
            Owners and admins only: act as this member of the workspace, like
            View As (user ids from list_members). Every use is audited.
        - in: query
          name: range
          schema:
            description: >-
              Whole days ending yesterday (UTC): 7d, 14d, 30d, 90d, 6m (183
              days) or 12m (365). Default 30d.
            type: string
            enum:
              - 7d
              - 14d
              - 30d
              - 90d
              - 6m
              - 12m
          description: >-
            Whole days ending yesterday (UTC): 7d, 14d, 30d, 90d, 6m (183 days)
            or 12m (365). Default 30d.
        - in: query
          name: interval
          schema:
            description: Points in `series`. Default day, week for 6m and 12m.
            type: string
            enum:
              - day
              - week
          description: Points in `series`. Default day, week for 6m and 12m.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Analytics'
        '400':
          description: >-
            Invalid request (`validation_failed`, `workspace_required`,
            `credentials_in_url`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            Missing, invalid, revoked or expired key or access token
            (`unauthorized`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            This workspace needs a paid plan or a trial (`plan_required`, with
            `details.upgrade_url`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Not allowed (`insufficient_scope`, `api_disabled`,
            `workspace_locked`, `as_user_forbidden`, `viewer_read_only`,
            `managed_member_restricted`, `platform_not_enabled`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found, or not yours (`not_found`, `workspace_not_found`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '423':
          description: >-
            The account or workspace is scheduled for deletion
            (`deletion_pending`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited (`rate_limited`); see `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Our fault (`internal_error`); quote the `request_id`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            The API is not available (`api_unavailable`), or changes are paused
            (`writes_unavailable`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Analytics:
      type: object
      properties:
        object:
          type: string
          const: analytics
        has_data:
          type: boolean
        message:
          description: Why there are no numbers, when has_data is false.
          type:
            - string
            - 'null'
        account:
          anyOf:
            - type: object
              properties:
                platform:
                  type: string
                  const: linkedin
                type:
                  type: string
                  enum:
                    - personal
                    - company_page
                connected:
                  type: boolean
              required:
                - platform
                - type
                - connected
              additionalProperties: false
            - type: 'null'
        period:
          type: object
          properties:
            from:
              type: string
            to:
              type: string
            previous_from:
              type: string
            previous_to:
              type: string
            days:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
          required:
            - from
            - to
            - previous_from
            - previous_to
            - days
          additionalProperties: false
        days_with_data:
          type: object
          properties:
            current:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            previous:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
          required:
            - current
            - previous
          additionalProperties: false
        as_of:
          description: When the numbers were last updated.
          type:
            - string
            - 'null'
        totals_coverage:
          type: string
          enum:
            - full
            - partial
            - none
          description: Whether every day of the period has numbers.
        impressions:
          type: object
          properties:
            value:
              type:
                - number
                - 'null'
            previous:
              description: The same number of days just before.
              type:
                - number
                - 'null'
            change_pct:
              description: >-
                Percent change from previous; null when there is nothing to
                compare with.
              type:
                - number
                - 'null'
          required:
            - value
            - previous
            - change_pct
          additionalProperties: false
        engagements:
          type: object
          properties:
            value:
              type:
                - number
                - 'null'
            previous:
              description: The same number of days just before.
              type:
                - number
                - 'null'
            change_pct:
              description: >-
                Percent change from previous; null when there is nothing to
                compare with.
              type:
                - number
                - 'null'
          required:
            - value
            - previous
            - change_pct
          additionalProperties: false
          description: >-
            Reactions, comments, shares, saves and sends, as LinkedIn counts
            them.
        new_followers:
          type: object
          properties:
            value:
              type:
                - number
                - 'null'
            previous:
              description: The same number of days just before.
              type:
                - number
                - 'null'
            change_pct:
              description: >-
                Percent change from previous; null when there is nothing to
                compare with.
              type:
                - number
                - 'null'
          required:
            - value
            - previous
            - change_pct
          additionalProperties: false
          description: Net change (can be negative).
        engagement_rate:
          description: Engagements / impressions, 0 to 1.
          type:
            - number
            - 'null'
        posts_published:
          type: object
          properties:
            captureflow:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            external_known:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
              description: >-
                Posts published outside CaptureFlow that CaptureFlow has seen
                (for a personal profile only the ones LinkedIn lists as top
                posts).
            change_pct:
              description: For the CaptureFlow posts.
              type:
                - number
                - 'null'
          required:
            - captureflow
            - external_known
            - change_pct
          additionalProperties: false
        reach:
          anyOf:
            - type: object
              properties:
                value:
                  type:
                    - number
                    - 'null'
                window_from:
                  type: string
                window_to:
                  type: string
              required:
                - value
                - window_from
                - window_to
              additionalProperties: false
            - type: 'null'
          description: >-
            Personal profiles: people reached over the period's length, as of
            the last update (no previous value).
        saves:
          anyOf:
            - type: object
              properties:
                value:
                  type:
                    - number
                    - 'null'
                window_from:
                  type: string
                window_to:
                  type: string
              required:
                - value
                - window_from
                - window_to
              additionalProperties: false
            - type: 'null'
        sends:
          anyOf:
            - type: object
              properties:
                value:
                  type:
                    - number
                    - 'null'
                window_from:
                  type: string
                window_to:
                  type: string
              required:
                - value
                - window_from
                - window_to
              additionalProperties: false
            - type: 'null'
        clicks:
          anyOf:
            - type: object
              properties:
                value:
                  type:
                    - number
                    - 'null'
                previous:
                  description: The same number of days just before.
                  type:
                    - number
                    - 'null'
                change_pct:
                  description: >-
                    Percent change from previous; null when there is nothing to
                    compare with.
                  type:
                    - number
                    - 'null'
              required:
                - value
                - previous
                - change_pct
              additionalProperties: false
            - type: 'null'
          description: Company pages.
        organic_followers:
          anyOf:
            - type: object
              properties:
                value:
                  type:
                    - number
                    - 'null'
                previous:
                  description: The same number of days just before.
                  type:
                    - number
                    - 'null'
                change_pct:
                  description: >-
                    Percent change from previous; null when there is nothing to
                    compare with.
                  type:
                    - number
                    - 'null'
              required:
                - value
                - previous
                - change_pct
              additionalProperties: false
            - type: 'null'
          description: Company pages.
        paid_followers:
          anyOf:
            - type: object
              properties:
                value:
                  type:
                    - number
                    - 'null'
                previous:
                  description: The same number of days just before.
                  type:
                    - number
                    - 'null'
                change_pct:
                  description: >-
                    Percent change from previous; null when there is nothing to
                    compare with.
                  type:
                    - number
                    - 'null'
              required:
                - value
                - previous
                - change_pct
              additionalProperties: false
            - type: 'null'
          description: Company pages.
        impressions_30d:
          anyOf:
            - type: object
              properties:
                value:
                  type:
                    - number
                    - 'null'
                window:
                  type: string
                  const: 30d
                as_of:
                  type:
                    - string
                    - 'null'
              required:
                - value
                - window
                - as_of
              additionalProperties: false
            - type: 'null'
          description: 'Company pages: the last 30 days as of the last update.'
        page_views:
          anyOf:
            - type: object
              properties:
                value:
                  type:
                    - number
                    - 'null'
                window:
                  type: string
                  const: 30d
                as_of:
                  type:
                    - string
                    - 'null'
              required:
                - value
                - window
                - as_of
              additionalProperties: false
            - type: 'null'
          description: 'Company pages: the last 30 days as of the last update.'
        series:
          type: object
          properties:
            interval:
              type: string
              enum:
                - day
                - week
            points:
              type: array
              items:
                type: object
                properties:
                  date:
                    type: string
                    description: The first day of the point.
                  days:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    description: Days it covers (a week can be shorter at the start).
                  impressions:
                    type:
                      - number
                      - 'null'
                  engagements:
                    type:
                      - number
                      - 'null'
                  new_followers:
                    type:
                      - number
                      - 'null'
                required:
                  - date
                  - days
                  - impressions
                  - engagements
                  - new_followers
                additionalProperties: false
          required:
            - interval
            - points
          additionalProperties: false
        app_url:
          type: string
      required:
        - object
        - has_data
        - message
        - account
        - period
        - days_with_data
        - as_of
        - totals_coverage
        - impressions
        - engagements
        - new_followers
        - engagement_rate
        - posts_published
        - reach
        - saves
        - sends
        - clicks
        - organic_followers
        - paid_followers
        - impressions_30d
        - page_views
        - series
        - app_url
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: The kind of error, e.g. `permission_error`.
            code:
              type: string
              description: Stable code to branch on, e.g. `insufficient_scope`.
            message:
              type: string
              description: For people; may change.
            param:
              type: string
            details:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
            doc_url:
              type: string
            request_id:
              type: string
              description: Quote it when contacting support.
          required:
            - type
            - code
            - message
            - doc_url
            - request_id
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: cf_live_...
      description: An API key from Settings > API & MCP.
    oauth2:
      type: oauth2
      description: >-
        An app the user connected (OAuth 2.1, PKCE S256, client ID metadata
        documents or dynamic registration). Access tokens look like
        `cfo_at_...`.
      flows:
        authorizationCode:
          authorizationUrl: https://app.captureflow.ai/oauth/authorize
          tokenUrl: https://app.captureflow.ai/api/oauth/token
          refreshUrl: https://app.captureflow.ai/api/oauth/token
          scopes:
            ideas:read: Read content ideas.
            ideas:write: Create content ideas.
            inputs:read: Read inputs (text, links, uploads) and their processing state.
            inputs:write: 'Create inputs: text, links and file uploads.'
            posts:read: Read posts and check them against platform rules.
            posts:write: Create and edit draft posts.
            posts:schedule: >-
              Propose posts for scheduling or posting; the user accepts each
              proposal in CaptureFlow.
            strategy:read: Read the content strategy.
            brand:read: 'Reserved: no endpoints yet.'
            knowledge:read: 'Reserved: no endpoints yet.'
            accounts:read: Read connected social accounts.
            analytics:read: 'Read LinkedIn analytics: account results and each post''s numbers.'
            agent:run: Start the content agent and read its runs.

````

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