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

# Get analytics engagement data

> Returns the analytics engagement data for the specified environment.



## OpenAPI

````yaml get /environments/{environmentId}/analytics/engagement
openapi: 3.0.1
info:
  title: Dashboard API
  description: Dashboard API documentation
  version: 1.0.0
servers:
  - url: https://app.dynamicauth.com/api/v0
  - url: https://app.dynamic.xyz/api/v0
  - url: http://localhost:3333/api/v0
security: []
tags:
  - name: Analytics
  - name: SDK
  - name: Organizations
  - name: Projects
  - name: Environments
  - name: Users
  - name: Invites
  - name: Tokens
  - name: Origins
  - name: Allowlists
  - name: Wallets
  - name: Members
  - name: Sessions
  - name: Settings
  - name: Gates
  - name: Chains
  - name: Exports
  - name: Events
  - name: Webhooks
  - name: Custom Fields
  - name: OrganizationMfaSettings
  - name: CustomHostnames
  - name: TestAccount
  - name: NameServices
  - name: GlobalWallets
  - name: GlobalWalletConnections
  - name: UserApiTokens
  - name: Waas
  - name: WalletConnect
paths:
  /environments/{environmentId}/analytics/engagement:
    get:
      tags:
        - Analytics
      summary: Get analytics engagement data
      operationId: getAnalyticsEngagement
      parameters:
        - $ref: '#/components/parameters/environmentId'
        - in: query
          name: start
          required: true
          schema:
            type: string
          description: Start date in ISO format (YYYY-MM-DD)
        - in: query
          name: end
          required: true
          schema:
            type: string
          description: End date in ISO format (YYYY-MM-DD)
      responses:
        '200':
          description: Analytics engagement data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnalyticsEngagementResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  parameters:
    environmentId:
      in: path
      name: environmentId
      required: true
      description: ID of the environment
      schema:
        $ref: '#/components/schemas/uuid'
  schemas:
    AnalyticsEngagementResponse:
      type: object
      required:
        - activeWeeklyDays
        - retention
        - sessionsHeatmap
      properties:
        activeWeeklyDays:
          type: array
          items:
            $ref: '#/components/schemas/ActiveWeeklyDaysResult'
        retention:
          type: object
          required:
            - allUsers
            - newUsers
          properties:
            allUsers:
              type: array
              items:
                $ref: '#/components/schemas/RetentionTrendResult'
            newUsers:
              type: array
              items:
                $ref: '#/components/schemas/RetentionTrendResult'
        sessionsHeatmap:
          type: array
          items:
            $ref: '#/components/schemas/SessionsHeatmapResult'
    uuid:
      type: string
      pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
      minLength: 36
      maxLength: 36
      example: 95b11417-f18f-457f-8804-68e361f9164f
    ActiveWeeklyDaysResult:
      type: object
      required:
        - nDays
        - nUserWeeks
        - pctUserWeeks
      properties:
        nDays:
          type: integer
          description: Number of active days per week
        nUserWeeks:
          type: integer
          description: Number of user-weeks with this activity level
        pctUserWeeks:
          type: number
          format: float
          description: Percentage of user-weeks with this activity level
    RetentionTrendResult:
      type: object
      required:
        - cohortWeek
        - returningWeek
      properties:
        cohortWeek:
          type: string
          format: date
          description: Week beginning date for this cohort
        returningWeek:
          type: string
          format: date
          description: Week beginning date for returning week
        retentionPct:
          type: number
          format: float
          nullable: true
          description: Retention percentage for this cohort
    SessionsHeatmapResult:
      type: object
      required:
        - hourBucket
        - weekday
        - nSessionsVisits
      properties:
        hourBucket:
          type: integer
          minimum: 0
          maximum: 23
          description: Hour of day (0-23)
        weekday:
          type: integer
          minimum: 0
          maximum: 6
          description: Day of week (0-6, with 0 being Sunday)
        nSessionsVisits:
          type: integer
          description: Number of sessions/visits in this time period
    BadRequest:
      type: object
      properties:
        error:
          type: string
    Unauthorized:
      type: object
      properties:
        error:
          type: string
          example: No jwt provided!
    Forbidden:
      type: object
      properties:
        error:
          type: string
          example: Access Forbidden
    InternalServerError:
      type: object
      properties:
        error:
          type: string
          example: Internal Server Error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BadRequest'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Forbidden'
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/InternalServerError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````