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

# List audit-log entries for the active organization. Owner/admin only.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/auth/orgs/audit-logs
openapi: 3.1.0
info:
  title: Kayle ID
  version: 1.5.0
  description: Privacy-first identity verification.
  license:
    name: Apache License 2.0
    url: https://github.com/kayleai/kayle-id/blob/main/LICENSE
  contact:
    name: Kayle ID
    url: https://kayle.id
    email: help@kayle.id
  termsOfService: https://kayle.id/terms
servers:
  - url: http://127.0.0.1:8787
    description: ''
security:
  - bearerAuth: []
paths:
  /v1/auth/orgs/audit-logs:
    get:
      tags:
        - Organizations
      summary: List audit-log entries for the active organization. Owner/admin only.
      parameters:
        - schema:
            type: integer
            minimum: 1
            maximum: 100
          required: false
          name: limit
          in: query
        - schema:
            type: string
          required: false
          name: starting_after
          in: query
        - schema:
            type: string
            description: >-
              Single event name or comma-separated list of event names to
              include. Unknown names are ignored; pass none to include every
              event type.
          required: false
          description: >-
            Single event name or comma-separated list of event names to include.
            Unknown names are ignored; pass none to include every event type.
          name: event
          in: query
        - schema:
            type: string
            format: uuid
            description: Restrict to entries whose actor is this user.
          required: false
          description: Restrict to entries whose actor is this user.
          name: actor_user_id
          in: query
        - schema:
            type: string
            format: uuid
            description: >-
              Restrict to entries whose actor is this API key. Useful when
              investigating what a single key did.
          required: false
          description: >-
            Restrict to entries whose actor is this API key. Useful when
            investigating what a single key did.
          name: actor_api_key_id
          in: query
        - schema:
            type: string
            enum:
              - user
              - system
              - api_key
            description: >-
              Restrict to entries whose actor type matches. `system` covers
              cron/background work; `api_key` covers programmatic calls; `user`
              covers dashboard sessions.
          required: false
          description: >-
            Restrict to entries whose actor type matches. `system` covers
            cron/background work; `api_key` covers programmatic calls; `user`
            covers dashboard sessions.
          name: actor_type
          in: query
        - schema:
            type: string
            format: date-time
            description: Return entries created at or after this ISO 8601 timestamp.
          required: false
          description: Return entries created at or after this ISO 8601 timestamp.
          name: created_from
          in: query
        - schema:
            type: string
            format: date-time
            description: Return entries created at or before this ISO 8601 timestamp.
          required: false
          description: Return entries created at or before this ISO 8601 timestamp.
          name: created_to
          in: query
        - schema:
            type: string
            minLength: 1
            maxLength: 200
            description: >-
              Free-text search across event name, target id, and actor
              name/email.
          required: false
          description: Free-text search across event name, target id, and actor name/email.
          name: q
          in: query
      responses:
        '200':
          description: Paginated list of audit-log entries.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AuditLog'
                  error:
                    type: 'null'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
                required:
                  - data
                  - error
                  - pagination
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                    description: Empty data object.
                  error:
                    type:
                      - object
                      - 'null'
                    properties:
                      code:
                        type: string
                        description: The error code
                      message:
                        type: string
                        description: The error message
                      hint:
                        type: string
                        description: A hint to help the user fix the error
                      docs:
                        type: string
                        description: A link to the documentation for the error
                    required:
                      - code
                      - message
                      - hint
                      - docs
                required:
                  - data
                  - error
        '403':
          description: Caller is not an admin or owner of this organization.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                    description: Empty data object.
                  error:
                    type:
                      - object
                      - 'null'
                    properties:
                      code:
                        type: string
                        description: The error code
                      message:
                        type: string
                        description: The error message
                      hint:
                        type: string
                        description: A hint to help the user fix the error
                      docs:
                        type: string
                        description: A link to the documentation for the error
                    required:
                      - code
                      - message
                      - hint
                      - docs
                required:
                  - data
                  - error
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: 'null'
                    description: Empty data object.
                  error:
                    type:
                      - object
                      - 'null'
                    properties:
                      code:
                        type: string
                        description: The error code
                      message:
                        type: string
                        description: The error message
                      hint:
                        type: string
                        description: A hint to help the user fix the error
                      docs:
                        type: string
                        description: A link to the documentation for the error
                    required:
                      - code
                      - message
                      - hint
                      - docs
                required:
                  - data
                  - error
components:
  schemas:
    AuditLog:
      type: object
      properties:
        id:
          type: string
        event:
          type: string
        actor:
          $ref: '#/components/schemas/AuditLogActor'
        targetId:
          type:
            - string
            - 'null'
        targetType:
          type:
            - string
            - 'null'
        metadata:
          type: object
          additionalProperties: {}
        createdAt:
          type: string
      required:
        - id
        - event
        - actor
        - targetId
        - targetType
        - metadata
        - createdAt
    Pagination:
      type: object
      properties:
        limit:
          type: number
          description: The maximum number of items returned.
          example: 10
        has_more:
          type: boolean
          description: Whether there are more items available after this page.
          example: false
        next_cursor:
          type:
            - string
            - 'null'
          description: >-
            Cursor to use as `starting_after` to fetch the next page of results,
            or null if there are no more items.
          example: null
      required:
        - limit
        - has_more
        - next_cursor
    AuditLogActor:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
        type:
          type: string
          enum:
            - user
            - system
            - api_key
        name:
          type:
            - string
            - 'null'
        email:
          type:
            - string
            - 'null'
        apiKeyId:
          type:
            - string
            - 'null'
        apiKeyName:
          type:
            - string
            - 'null'
      required:
        - id
        - type
        - name
        - email
        - apiKeyId
        - apiKeyName
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````