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

# List audit events

> Organization-wide audit log for owners, admins, and org-wide admin API keys. Project-scoped keys are rejected. Defaults to the last 7 days; the window may not exceed 90 days. Pass the returned next_cursor (JSON) back as cursor to page.



## OpenAPI

````yaml https://api.uselemma.ai/openapi.json get /audit-events
openapi: 3.1.0
info:
  title: Lemma Platform API
  description: Lemma Platform HTTP API for AI observability and workspace operations.
  version: 0.1.0
servers:
  - url: https://api.uselemma.ai
    description: Lemma production API
security:
  - bearerAuth: []
paths:
  /audit-events:
    get:
      tags:
        - Audit log
      summary: List audit events
      description: >-
        Organization-wide audit log for owners, admins, and org-wide admin API
        keys. Project-scoped keys are rejected. Defaults to the last 7 days; the
        window may not exceed 90 days. Pass the returned next_cursor (JSON) back
        as cursor to page.
      operationId: list_audit_events
      parameters:
        - name: actor_type
          in: query
          required: false
          description: 'Who acted: user, api_key, staff, or system.'
          schema:
            type: string
            enum:
              - user
              - api_key
              - staff
              - system
        - name: actor_id
          in: query
          required: false
          description: Exact actor id (user id or API key id).
          schema:
            type: string
        - name: action
          in: query
          required: false
          description: >-
            Audit action from the catalog, e.g. api_key.create. Repeatable;
            comma-separated values are also accepted. Unknown actions are a 400.
          schema:
            type: array
            items:
              type: string
        - name: target_type
          in: query
          required: false
          description: Exact target type, e.g. project or user.
          schema:
            type: string
        - name: target_id
          in: query
          required: false
          description: Exact target id.
          schema:
            type: string
        - name: start
          in: query
          required: false
          description: Inclusive ISO 8601 start. Defaults to 7 days before end.
          schema:
            type: string
            format: date-time
        - name: end
          in: query
          required: false
          description: Inclusive ISO 8601 end. Defaults to now.
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          required: false
          description: Maximum number of records to return.
          schema:
            type: integer
            minimum: 1
        - name: cursor
          in: query
          required: false
          description: Pagination cursor from a previous response's next_cursor.
          schema:
            type: string
      responses:
        '200':
          description: Audit events page
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        actor_type:
                          type: string
                          enum:
                            - user
                            - api_key
                            - staff
                            - system
                        actor_id:
                          type: string
                        impersonator_user_id:
                          type:
                            - string
                            - 'null'
                        action:
                          type: string
                        target_type:
                          type:
                            - string
                            - 'null'
                        target_id:
                          type:
                            - string
                            - 'null'
                        ip:
                          type:
                            - string
                            - 'null'
                        user_agent:
                          type:
                            - string
                            - 'null'
                        occurred_at:
                          type: string
                          format: date-time
                        metadata:
                          type: object
                          additionalProperties: {}
                      required:
                        - id
                        - actor_type
                        - actor_id
                        - impersonator_user_id
                        - action
                        - target_type
                        - target_id
                        - ip
                        - user_agent
                        - occurred_at
                        - metadata
                      additionalProperties: false
                  total:
                    type: number
                  next_cursor:
                    type:
                      - object
                      - 'null'
                    properties:
                      created_at:
                        type: string
                      id:
                        type: string
                    required:
                      - created_at
                      - id
                    additionalProperties: false
                required:
                  - data
                  - total
                  - next_cursor
                additionalProperties: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                required:
                  - detail
                additionalProperties: false
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  code:
                    type: string
                required:
                  - detail
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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