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

# List audit log entries

> Retrieve audit log entries for the organization. Supports filtering by actions, resource types, and date range. Returns paginated results with filter options.



## OpenAPI

````yaml /openapi.json get /v1/audit-logs
openapi: 3.0.3
info:
  title: CodeRabbit API spec
  version: 1.0.0
servers:
  - url: https://api.coderabbit.ai
security:
  - ApiKeyAuth: []
paths:
  /v1/audit-logs:
    get:
      tags:
        - Audit Logs
      summary: List audit log entries
      description: >-
        Retrieve audit log entries for the organization. Supports filtering by
        actions, resource types, and date range. Returns paginated results with
        filter options.
      operationId: audit-logs-list
      parameters:
        - in: header
          name: x-coderabbitai-api-key
          required: true
          schema:
            type: string
          description: API key for authentication
        - in: query
          name: org_id
          required: false
          schema:
            type: string
          description: >-
            Workspace-scoped API tokens only. When provided, returns audit logs
            for that single git-provider organization within the token's
            workspace; when omitted, returns workspace-wide audit logs (all
            organizations plus workspace-level events). Ignored for organization
            and self-hosted keys.
        - in: query
          name: search
          required: false
          schema:
            type: string
            maxLength: 200
          description: Search audit logs by actor name (case-insensitive partial match)
        - in: query
          name: actions
          required: false
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - create
                - delete
                - update
                - assign
                - unassign
                - cancellation_initiated
                - cancellation_confirmed
          description: Comma-separated list of action types to filter by (max 50).
        - in: query
          name: resource_types
          required: false
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
              enum:
                - organization
                - repository
                - subscription_seat
                - cr_config
                - subscription
                - repo_config
                - user_role
                - api_key
                - payment_source
                - custom_certificate
          description: Comma-separated list of resource types to filter by (max 50).
        - in: query
          name: date_from
          required: false
          schema:
            type: string
            format: date-time
            example: '2026-01-01T00:00:00.000Z'
          description: Start date for the query range (ISO 8601 format)
        - in: query
          name: date_to
          required: false
          schema:
            type: string
            format: date-time
            example: '2026-03-19T23:59:59.999Z'
          description: End date for the query range (ISO 8601 format)
        - in: query
          name: page
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: Page number for pagination
        - in: query
          name: page_size
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
          description: Number of items per page
      responses:
        '200':
          description: Successfully retrieved audit log entries
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/AuditLogEntry'
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                      page_size:
                        type: integer
                      total_count:
                        type: integer
                      total_pages:
                        type: integer
                      has_next_page:
                        type: boolean
                      has_previous_page:
                        type: boolean
                  filter_options:
                    type: object
                    properties:
                      actions:
                        type: array
                        items:
                          $ref: '#/components/schemas/FilterOption'
                      resource_types:
                        type: array
                        items:
                          $ref: '#/components/schemas/FilterOption'
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                            - INVALID_PARAMETER
                            - TOO_MANY_ITEMS
                            - INVALID_DATE_RANGE
                        message:
                          type: string
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        message:
                          type: string
        '403':
          description: Forbidden - Not an admin, agentic key, or missing Enterprise plan
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - NOT_ADMIN
                          - KEY_TYPE_FORBIDDEN
                          - ENTERPRISE_PLAN_REQUIRED
                      message:
                        type: string
        '410':
          description: Legacy API key - deprecated
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - LEGACY_API_KEY
                      message:
                        type: string
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        enum:
                          - RATE_LIMIT_EXCEEDED
                      message:
                        type: string
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: string
                          enum:
                            - INTERNAL_ERROR
                        message:
                          type: string
      security:
        - ApiKeyAuth: []
components:
  schemas:
    AuditLogEntry:
      type: object
      properties:
        id:
          type: string
        action:
          type: string
          example: repository_create
        actionLabel:
          type: string
          example: Added repository
        resourceType:
          type: string
          example: repository
        resourceTypeLabel:
          type: string
          example: Repository
        resourceSummary:
          type: string
          example: my-org/my-repo
        actor:
          type: object
          properties:
            name:
              type: string
            subtitle:
              type: string
            isBot:
              type: boolean
            avatarUrl:
              type: string
              nullable: true
        metadata:
          type: object
        ipAddress:
          type: string
          nullable: true
        createdAt:
          type: string
          format: date-time
        relativeTime:
          type: string
          example: 1d ago
    FilterOption:
      type: object
      properties:
        value:
          type: string
        label:
          type: string
        count:
          type: integer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-coderabbitai-api-key
      description: >-
        API key for authentication. You can create an API key from the
        CodeRabbit dashboard.

````

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