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

# List policy, asset or customer events.



## OpenAPI

````yaml /openapi.json get /policies/{policyId}/events
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /policies/{policyId}/events:
    get:
      tags:
        - policy
      summary: List policy, asset or customer events.
      operationId: PolicyController_listPolicyEvents
      parameters:
        - name: policyId
          required: true
          in: path
          description: the policy id
          schema:
            type: string
        - name: whenAt
          required: false
          in: query
          description: 'Optional: the whenAt datetime'
          schema:
            type: string
        - name: simulatedAt
          required: false
          in: query
          description: 'Optional: the simulatedAt datetime'
          schema:
            type: string
        - name: branchId
          required: false
          in: query
          description: 'Optional: the branchId'
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPolicyEventsOutput'
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PolicyNotFoundErrorDto'
              examples:
                POLICY_NOT_FOUND:
                  $ref: '#/components/schemas/PolicyNotFoundErrorDto'
          description: ''
components:
  schemas:
    ListPolicyEventsOutput:
      type: object
      properties:
        total:
          type: number
          description: Total number of policies
        offset:
          type: number
          description: Offset used for pagination
        limit:
          type: number
          description: Page size used for pagination
        data:
          description: Array of policy events
          type: array
          items:
            $ref: '#/components/schemas/PolicyEventDto'
      required:
        - data
    PolicyNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - POLICY_NOT_FOUND
        message:
          type: string
          example: Policy {policyId} ({branchId}) not found
        details:
          $ref: '#/components/schemas/PolicyNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    PolicyEventDto:
      type: object
      properties:
        aggregateId:
          type: string
          description: policy event aggregate id
        aggregateType:
          type: string
          description: policy event aggregate type
          enum:
            - PAYMENT_METHOD
            - PAYMENT
            - POLICY
            - CUSTOMER
            - ASSET
            - INVOICE
            - DOCUMENT
            - SIGNATURE
            - TENANT
            - PRODUCT
            - QUOTE
            - BROKERAGE_FIRM
            - CLAIM
            - EXTERNAL_SERVICE
            - NOTIFICATION
            - PREMIUM_SCHEDULE
            - CHECK
            - ALERT
            - DISTRIBUTION_REQUEST
            - DEROGATION
            - BROKERAGE_FEE
            - COMMENT
            - CONVERSATION
            - CONVERSATION_MESSAGE
            - BRANCH
            - ROOT
            - JOB
            - ROLE
            - SESSION
            - WORKFLOW_RUN
            - WORKFLOW_RUN_NODE
            - JOB_SCHEDULER
            - JOB_SCHEDULER_RUN
            - RELATION
            - MIGRATION_TASK
            - AI_OPERATION
            - AI_FEEDBACK
        version:
          type: number
          description: policy event version
        createdAt:
          format: date-time
          type: string
          description: policy event createdAt
        updatedAt:
          format: date-time
          type: string
          description: policy event updatedAt
        type:
          type: string
          description: policy event type
        data:
          type: object
          description: policy event data
        metadata:
          description: policy event metadata
          allOf:
            - $ref: '#/components/schemas/EventMetadataDto'
      required:
        - aggregateId
        - aggregateType
        - version
        - createdAt
        - updatedAt
        - type
        - data
        - metadata
    PolicyNotFoundDetailsDto:
      type: object
      properties:
        policyId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - policyId
    EventMetadataDto:
      type: object
      properties:
        rootId:
          type: string
          description: The root aggregate id (policy id)
        branchId:
          type: string
          description: The branch id
        tenantId:
          type: string
          description: The tenant id
        productId:
          type: string
          description: The product id
        userId:
          type: string
          description: The user id
        isSimulated:
          type: boolean
          description: Is the event simulated
        isCustomEvent:
          type: boolean
          description: Is this a custom event
        createdAt:
          type: string
          description: The event creation date
        appliedAt:
          type: string
          description: The date the event was applied
        migrated:
          type: boolean
          description: Is this event migrated
        migrationId:
          type: string
          description: The migration id, if migrated
      required:
        - rootId
        - branchId
        - tenantId
        - createdAt

````