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

# List Audit Logs

<Note>
  This API is in Beta. Please report any issues to our support team.
</Note>


## OpenAPI

````yaml GET /audit-logs
openapi: 3.0.1
info:
  title: OpenAPI Matia
  description: Matia API using the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.matia.io/v1
security:
  - ApiKeyAuth: []
paths:
  /audit-logs:
    get:
      summary: List audit logs
      parameters:
        - name: limit
          in: query
          description: Max number of audit logs to return.
          schema:
            type: integer
            default: 20
            maximum: 100
        - name: offset
          in: query
          description: Number of audit logs to skip for pagination.
          schema:
            type: integer
            default: 0
        - name: sortBy
          in: query
          description: The field to sort the audit logs by.
          schema:
            type: string
            enum:
              - timestamp
            default: timestamp
        - name: sortOrder
          in: query
          description: The direction of the sort.
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: startAt
          in: query
          description: Filter for audit logs AFTER this timestamp (inclusive).
          schema:
            type: string
            format: date-time
            example: '2025-12-27T00:00:00Z'
        - name: endAt
          in: query
          description: Filter for audit logs BEFORE this timestamp (exclusive).
          schema:
            type: string
            format: date-time
            example: '2025-12-27T23:59:59Z'
      responses:
        '200':
          description: Successfully listed audit logs
          content:
            application/json:
              schema:
                properties:
                  code:
                    type: string
                  data:
                    type: object
                    properties:
                      totalItems:
                        type: integer
                        description: Total number of audit logs matching the filters.
                        example: 1250
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/AuditLog'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AuditLog:
      type: object
      required:
        - id
        - timestamp
        - event
        - actor
      properties:
        id:
          type: string
          format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
        timestamp:
          type: string
          format: date-time
          description: UTC timestamp of the audit log.
          example: '2025-12-27T16:20:00Z'
        event:
          type: string
          example: User logged in
        actor:
          $ref: '#/components/schemas/Actor'
        context:
          $ref: '#/components/schemas/Context'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
    Actor:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - user
            - system
          example: user
        email:
          type: string
          format: email
          example: user@email.com
    Context:
      type: object
      properties:
        ipAddress:
          type: string
          format: ipv4
          example: 192.168.1.1
        userAgent:
          type: string
          example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)...
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````