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

# Show profile analytics



## OpenAPI

````yaml /openapi.json get /analytics/profiles/{profile}
openapi: 3.1.0
info:
  title: PublishBuddy
  version: 0.0.1
servers:
  - url: https://api.publishbuddy.com/v1
security: []
paths:
  /analytics/profiles/{profile}:
    get:
      tags:
        - ProfileAnalytics
      summary: Show profile analytics
      operationId: profileAnalytics.show
      parameters:
        - name: profile
          in: path
          required: true
          description: The profile UUID
          schema:
            type: string
        - name: post_type_id
          in: query
          description: Filter posts by post type ID.
          schema:
            type: string
            enum:
              - '1'
              - '2'
              - '3'
              - '4'
              - '5'
              - '6'
              - '7'
              - '8'
              - '9'
              - '10'
              - '11'
        - name: timeframe
          in: query
          description: Predefined timeframe value, e.g. last_7_days.
          schema:
            type: string
            enum:
              - last_14_days
              - last_7_days
              - last_30_days
              - last_90_days
              - prev_month
              - this_month
              - this_week
              - for_all_time
        - name: order[name]
          in: query
          description: Sort field name.
          schema:
            type: string
            enum:
              - social_posts.post_created_at
              - post_metrics.likes
              - post_metrics.comments
              - post_metrics.shares
              - post_metrics.total_engagement
              - post_metrics.engagement_rate
              - post_metrics.reach
        - name: order[value]
          in: query
          description: Sort direction.
          schema:
            type: string
            enum:
              - asc
              - desc
        - name: Authorization
          in: header
          required: true
          description: JWT token.
          schema:
            type: string
          example: Bearer 123
      responses:
        '200':
          description: '`ProfileAnalyticsResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ProfileAnalyticsResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    ProfileAnalyticsResource:
      type: object
      properties:
        profile_id:
          type: string
        total:
          type: object
          properties:
            comments:
              type: string
            likes:
              type: string
            shares:
              type: string
            impressions:
              type: string
            quotes:
              type: string
            saves:
              type: string
            engagement_rate:
              type: string
          required:
            - comments
            - likes
            - shares
            - impressions
            - quotes
            - saves
            - engagement_rate
        posts:
          type: array
          items:
            $ref: '#/components/schemas/SocialPostAnalyticsResource'
        meta:
          type: object
          properties:
            current_page:
              type: string
            last_page:
              type: string
            per_page:
              type: string
            total:
              type: string
          required:
            - current_page
            - last_page
            - per_page
            - total
      required:
        - profile_id
        - total
        - posts
        - meta
      title: ProfileAnalyticsResource
    SocialPostAnalyticsResource:
      type: object
      properties:
        social_post_id:
          type: string
        post_id:
          type: string
        network:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - PUBLISHED
            - DRAFT
            - FAILED
            - NEEDS_APPROVAL
            - SCHEDULED
        post_url:
          type: string
        scheduled_at:
          type: string
        post_type:
          type: string
        analytics:
          anyOf:
            - type: object
              properties:
                comments:
                  type: integer
                likes:
                  type: integer
                shares:
                  type: integer
                impressions:
                  type: integer
                reach:
                  type: integer
                quotes:
                  type: integer
                views:
                  type: integer
                engagement_rate:
                  type: string
              required:
                - comments
                - likes
                - shares
                - impressions
                - reach
                - quotes
                - views
                - engagement_rate
            - type: object
      required:
        - social_post_id
        - post_id
        - network
        - status
        - post_url
        - scheduled_at
        - post_type
        - analytics
      title: SocialPostAnalyticsResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````