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

# Get Engagement

> Hub engagement overview (composite KPIs + leaderboards).

Pass ``section`` for a size-limited drill-down on a single section.
Valid section values: top_members_by_posts, top_members_by_comments,
top_posts, top_content, top_spaces, recent_members.

Use ``page[size]`` (1-100) to control how many rows the section returns.
The composite (no section) response is a fixed top-N preview.



## OpenAPI

````yaml /openapi/mio-openapi.json get /api/v1/teams/{team_id}/hubs/{hub_id}/analytics/engagement
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/hubs/{hub_id}/analytics/engagement:
    get:
      tags:
        - analytics-admin
      summary: Get Engagement
      description: |-
        Hub engagement overview (composite KPIs + leaderboards).

        Pass ``section`` for a size-limited drill-down on a single section.
        Valid section values: top_members_by_posts, top_members_by_comments,
        top_posts, top_content, top_spaces, recent_members.

        Use ``page[size]`` (1-100) to control how many rows the section returns.
        The composite (no section) response is a fixed top-N preview.
      operationId: >-
        analytics_admin.get_analytics_admin_get_teams_by_team_id_hubs_by_hub_id_analytics_engagement
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
        - in: path
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
        - in: query
          name: from
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: From
        - in: query
          name: to
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: To
        - in: query
          name: section
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Section
        - in: query
          name: page[size]
          required: false
          schema:
            default: 10
            maximum: 100
            minimum: 1
            title: Page[Size]
            type: integer
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/EngagementResponse'
          description: Successful Response
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Not authenticated
        '403':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Forbidden
        '404':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Resource not found
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: Unprocessable entity
      security:
        - HTTPBearer: []
components:
  schemas:
    EngagementResponse:
      properties:
        data:
          $ref: '#/components/schemas/EngagementResource'
      required:
        - data
      title: EngagementResponse
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    EngagementResource:
      properties:
        attributes:
          $ref: '#/components/schemas/EngagementAttributes'
        id:
          title: Id
          type: string
        type:
          const: analytics_engagement
          default: analytics_engagement
          title: Type
          type: string
      required:
        - id
        - attributes
      title: EngagementResource
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
    EngagementAttributes:
      properties:
        active_members:
          title: Active Members
          type: integer
        new_members:
          title: New Members
          type: integer
        recent_members:
          items:
            $ref: '#/components/schemas/RecentMember'
          title: Recent Members
          type: array
        top_content:
          items:
            $ref: '#/components/schemas/TopContent'
          title: Top Content
          type: array
        top_members_by_comments:
          items:
            $ref: '#/components/schemas/TopMember'
          title: Top Members By Comments
          type: array
        top_members_by_posts:
          items:
            $ref: '#/components/schemas/TopMember'
          title: Top Members By Posts
          type: array
        top_posts:
          items:
            $ref: '#/components/schemas/TopPost'
          title: Top Posts
          type: array
        top_spaces:
          items:
            $ref: '#/components/schemas/TopSpaceItem'
          title: Top Spaces
          type: array
        total_active_members:
          title: Total Active Members
          type: integer
      required:
        - total_active_members
        - new_members
        - active_members
      title: EngagementAttributes
      type: object
    RecentMember:
      additionalProperties: false
      properties:
        contact_id:
          title: Contact Id
          type: string
        joined_at:
          title: Joined At
          type: string
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
      required:
        - contact_id
        - joined_at
      title: RecentMember
      type: object
    TopContent:
      additionalProperties: false
      properties:
        completions:
          title: Completions
          type: integer
        node_id:
          title: Node Id
          type: string
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - node_id
        - completions
      title: TopContent
      type: object
    TopMember:
      additionalProperties: false
      properties:
        contact_id:
          title: Contact Id
          type: string
        count:
          title: Count
          type: integer
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
      required:
        - contact_id
        - count
      title: TopMember
      type: object
    TopPost:
      additionalProperties: false
      properties:
        comment_count:
          title: Comment Count
          type: integer
        discussion_id:
          title: Discussion Id
          type: string
        reaction_count:
          title: Reaction Count
          type: integer
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - discussion_id
        - comment_count
        - reaction_count
      title: TopPost
      type: object
    TopSpaceItem:
      additionalProperties: false
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        posts:
          title: Posts
          type: integer
        reactions:
          title: Reactions
          type: integer
        space_id:
          title: Space Id
          type: string
      required:
        - space_id
        - posts
        - reactions
      title: TopSpaceItem
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````