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

# List the records behind a metric

> Reads only; nothing is changed. Send the same body with each page's cursor.



## OpenAPI

````yaml /openapi.json post /v1/analytics/records
openapi: 3.1.0
info:
  title: Cluster API
  version: '1'
servers:
  - url: https://api.getcluster.ai
security: []
paths:
  /v1/analytics/records:
    post:
      tags:
        - Analytics
      summary: List the records behind a metric
      description: >-
        Reads only; nothing is changed. Send the same body with each page's
        cursor.
      operationId: list_analytics_records
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnalyticsRecordsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page_AnalyticsRecord_'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Payment Required
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '429':
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '503':
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Service Unavailable
      security:
        - ApiKey: []
components:
  schemas:
    AnalyticsRecordsRequest:
      properties:
        start_date:
          type: string
          format: date
          title: Start Date
        end_date:
          type: string
          format: date
          title: End Date
        timezone:
          type: string
          title: Timezone
          default: UTC
        scope:
          items:
            $ref: '#/components/schemas/AnalyticsScope'
          type: array
          maxItems: 6
          title: Scope
        metric:
          type: string
          enum:
            - leads_reached
            - replies
            - reply_rate
            - invitations_sent
            - invitations_accepted
            - acceptance_rate
            - messages_sent
            - emails_sent
            - calls_made
            - call_conversations
            - call_conversation_rate
            - positive_replies
            - positive_reply_rate
            - classified_replies
            - unclassified_replies
            - classification_coverage
          title: Metric
          default: leads_reached
        population:
          type: string
          enum:
            - numerator
            - denominator
          title: Population
          default: numerator
      additionalProperties: false
      type: object
      required:
        - start_date
        - end_date
      title: AnalyticsRecordsRequest
      description: >-
        Which records to list. Paging is in the query string, so the filters
        stay the same between pages.
    Page_AnalyticsRecord_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/AnalyticsRecord'
          type: array
          title: Data
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      type: object
      required:
        - data
      title: Page[AnalyticsRecord]
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorResponse
    AnalyticsScope:
      properties:
        dimension:
          type: string
          enum:
            - campaign
            - sequence
            - sender
            - channel
            - step
            - action
          title: Dimension
        value:
          type: string
          minLength: 1
          title: Value
      additionalProperties: false
      type: object
      required:
        - dimension
        - value
      title: AnalyticsScope
    AnalyticsRecord:
      properties:
        id:
          type: string
          title: Id
        occurred_at:
          type: string
          format: date-time
          title: Occurred At
        kind:
          type: string
          title: Kind
        classification:
          anyOf:
            - type: string
            - type: 'null'
          title: Classification
        name:
          type: string
          title: Name
        contact_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Contact Id
        campaign_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Campaign Id
        conversation_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Conversation Id
        dimensions:
          additionalProperties:
            type: string
          type: object
          title: Dimensions
        labels:
          additionalProperties:
            type: string
          type: object
          title: Labels
      type: object
      required:
        - id
        - occurred_at
        - kind
        - name
        - dimensions
        - labels
      title: AnalyticsRecord
    ErrorBody:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
        request_id:
          type: string
          title: Request Id
        details:
          anyOf:
            - items:
                $ref: '#/components/schemas/ErrorDetail'
              type: array
            - type: 'null'
          title: Details
      type: object
      required:
        - code
        - message
        - request_id
      title: ErrorBody
    ErrorDetail:
      properties:
        field:
          anyOf:
            - type: string
            - type: 'null'
          title: Field
        message:
          type: string
          title: Message
      type: object
      required:
        - message
      title: ErrorDetail
  securitySchemes:
    ApiKey:
      type: http
      description: A workspace API key, created under Settings, API keys.
      scheme: bearer

````

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