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

# List audit logs

> Use this endpoint to retrieve all audit log entries. You can filter the results by actor, date range, action type, and entity type. The response uses cursor-based pagination.



## OpenAPI

````yaml /en/openapi/v3-current/matcher.yaml get /v1/governance/audit-logs
openapi: 3.1.0
info:
  title: Matcher APIs
  description: >-
    Complete API reference for the Matcher reconciliation engine, providing
    automated transaction matching between Midaz Ledger and external systems.
  version: v2.1.1
  license:
    name: Elastic License 2.0
    url: https://www.elastic.co/licensing/elastic-license
servers:
  - url: https://matcher.sandbox.lerian.net
security: []
paths:
  /v1/governance/audit-logs:
    get:
      tags:
        - Governance
      summary: List audit logs
      description: >-
        Use this endpoint to retrieve all audit log entries. You can filter the
        results by actor, date range, action type, and entity type. The response
        uses cursor-based pagination.
      operationId: listAuditLogs
      parameters:
        - description: A unique identifier for tracing the request across services.
          in: header
          name: X-Request-Id
          schema:
            type: string
        - description: Filter by actor ID
          in: query
          name: actor
          schema:
            type: string
        - description: Filter logs from this date (YYYY-MM-DD or RFC3339)
          in: query
          name: date_from
          schema:
            type: string
        - description: Filter logs until this date (YYYY-MM-DD or RFC3339)
          in: query
          name: date_to
          schema:
            type: string
        - description: Filter by action type
          example: CREATE
          in: query
          name: action
          schema:
            type: string
        - description: Filter by entity type
          example: reconciliation_context
          in: query
          name: entity_type
          schema:
            type: string
        - description: The maximum number of items to include in the response.
          in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 20
        - description: The cursor value for retrieving the next page of results.
          in: query
          name: cursor
          schema:
            type: string
      responses:
        '200':
          description: >-
            Indicates that the request was successful and the response contains
            the expected data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAuditLogsResponse'
        '400':
          description: The request contains invalid parameters or payload.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: The request lacks valid authentication credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: An unexpected error occurred on the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    ListAuditLogsResponse:
      description: Paginated list of audit log entries
      properties:
        hasMore:
          example: true
          type: boolean
        items:
          description: List of audit log entries
          items:
            $ref: '#/components/schemas/AuditLogResponse'
          type: array
        limit:
          example: 20
          maximum: 200
          minimum: 1
          type: integer
        nextCursor:
          example: eyJpZCI6IjEyMyJ9
          type: string
        prevCursor:
          example: eyJpZCI6IjEyMiJ9
          type: string
      type: object
    ErrorResponse:
      description: Standard error response returned by all API endpoints
      type: object
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: HTTP status code as a string.
          example: '404'
        title:
          type: string
          description: Error type identifier.
          example: not_found
        message:
          type: string
          description: Human-readable error message with details.
          example: context not found
        error:
          type: string
          description: Deprecated. Error message for backward compatibility.
          deprecated: true
        details:
          description: Additional error context as key-value pairs
          additionalProperties: {}
          type: object
    AuditLogResponse:
      description: Immutable audit log entry for governance tracking
      properties:
        action:
          description: Action that was performed
          example: CREATE
          type: string
        actorId:
          description: ID of the actor who performed the action
          example: user@example.com
          type: string
        changes:
          description: Changes made to the entity
          items:
            type: integer
          type: array
        createdAt:
          description: Creation timestamp in RFC3339 format
          example: '2025-01-15T10:30:00.000Z'
          type: string
        entityId:
          description: ID of the entity that was modified
          example: 019c96a0-10a0-72d2-9fb0-2b7de8093182
          type: string
        entityType:
          description: Type of entity that was modified
          example: reconciliation_context
          type: string
        id:
          description: Unique identifier for the audit log entry
          example: 019c96a0-0b61-71a2-8595-dde786b5bcc6
          type: string
        tenantId:
          description: Tenant ID that owns this audit log entry
          example: 019c96a0-0a98-7287-9a31-786e0809c769
          type: string
        truncated:
          description: >-
            True when the original audit diff exceeded the payload cap and was
            replaced with a truncation marker
          example: false
          type: boolean
        originalSize:
          description: >-
            Byte size of the original diff before truncation; zero when not
            truncated
          example: 0
          format: int64
          type: integer
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer token authentication (format: "Bearer {token}")'

````