> ## 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 metrics



## OpenAPI

````yaml /openapi.json get /profiles/{profile}/metrics
openapi: 3.1.0
info:
  title: PublishBuddy
  version: 0.0.1
servers:
  - url: https://api.publishbuddy.com/v1
security: []
paths:
  /profiles/{profile}/metrics:
    get:
      tags:
        - ProfileMetrics
      summary: Show profile metrics
      operationId: profileMetrics.index
      parameters:
        - name: profile
          in: path
          required: true
          description: The profile UUID
          schema:
            type: string
        - name: timeframe
          in: query
          required: true
          description: Aggregation timeframe, e.g. last_7_days, last_30_days, this_month.
          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: Authorization
          in: header
          required: true
          description: JWT token.
          schema:
            type: string
          example: Bearer 123
      responses:
        '200':
          description: '`ProfileMetricsResource`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ProfileMetricsResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    ProfileMetricsResource:
      type: object
      properties:
        new_followers:
          type: string
          description: Count new followers
        likes:
          type: string
          description: Count likes
        reach:
          type: string
          description: Count of reach
        engagements:
          type: string
          description: Count of engagement
        published_posts:
          type: string
          description: Count of published posts
        new_followers_compare:
          type: string
          description: Compare new followers with same previous period in percent
        likes_compare:
          type: string
          description: Compare likes with same previous period in percent
        reach_compare:
          type: string
          description: Compare reach with same previous period in percent
        engagements_compare:
          type: string
          description: Compare engagement with same previous period in percent
        published_posts_compare:
          type: string
          description: Compare count of publish posts with same previous period in percent
        graphs:
          type: object
          description: Graph metrics
          properties:
            gender:
              type: string
              description: Gender amount graph
            age:
              type: string
              description: Age amount graph
            page_fans_country:
              type: string
              description: Page fans country amount graph
            page_fans_city:
              type: string
              description: Page fans city amount graph
            followers:
              type: string
              description: Followers count graph
            likes:
              type: string
              description: Likes amount graph
            post_engagement:
              type: string
              description: Post engagement amount graph
            post_reach:
              type: string
              description: Reach amount graph
            link_clicks:
              type: string
              description: Link clicks count graph
            video_views:
              type: string
              description: Video views amount graph
            posts:
              type: string
              description: Posts amount graph
          required:
            - gender
            - age
            - page_fans_country
            - page_fans_city
            - followers
            - likes
            - post_engagement
            - post_reach
            - link_clicks
            - video_views
            - posts
        best_time_to_post:
          type: array
          description: Recommended publication time
          items:
            $ref: '#/components/schemas/BestTimeToPostResource'
      required:
        - new_followers
        - likes
        - reach
        - engagements
        - published_posts
        - new_followers_compare
        - likes_compare
        - reach_compare
        - engagements_compare
        - published_posts_compare
        - graphs
        - best_time_to_post
      title: ProfileMetricsResource
    BestTimeToPostResource:
      type: object
      properties:
        weekDay:
          type: integer
        hour:
          type: integer
        score:
          type: integer
      required:
        - weekDay
        - hour
        - score
      title: BestTimeToPostResource
  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

````