> ## 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.

> [tab] CLI Tool
>
> ```bash
> coderabbit api request /audit-logs
> ```
>
> To install and sign in to the CLI, see [Call from the CLI](https://docs.coderabbit.ai/api/cli.md).

> [tab] MCP Server
>
> This operation isn't a tool on the [CodeRabbit MCP server](https://docs.coderabbit.ai/api/mcp.md). Call it over REST or from the CLI.


## OpenAPI

````yaml /openapi.json get /v1/audit-logs
openapi: 3.0.0
info:
  title: CodeRabbit API
  version: 1.0.0
  description: >-
    Read and manage CodeRabbit reviews, coding tasks, Verify, Triage, security
    findings, Knowledge Base, configuration, and users for your organization.
servers:
  - url: https://api.coderabbit.ai
    description: US region
  - url: https://api.eu.coderabbit.ai
    description: EU region
security:
  - ApiKeyAuth: []
tags:
  - name: Organizations and repositories
  - name: Pull requests and reviews
  - name: Coding Agent
  - name: Coding environments
  - name: Verify
  - name: Triage
  - name: Security
  - name: Knowledge Base
  - name: Automations
  - name: Reports
  - name: Configuration
  - name: Connections
  - name: Users and roles
  - name: Usage and metrics
paths:
  /v1/audit-logs:
    get:
      tags:
        - Users and roles
      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:
        - $ref: '#/components/parameters/WorkspaceOrgName'
        - in: query
          name: org_id
          required: false
          schema:
            type: string
          description: >-
            Workspace-scoped API tokens only. Supply this git-provider
            organization ID or org_name, never both, to select one
            organization's audit logs. When both selectors are omitted, returns
            workspace-wide audit logs (all organizations plus workspace-level
            events). This org_id parameter is 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:
  parameters:
    WorkspaceOrgName:
      in: query
      name: org_name
      required: false
      schema:
        $ref: '#/components/schemas/PlatformOrgName'
      description: >-
        GitHub organization login for a workspace API key, matched
        case-insensitively within that workspace. Supply either org_name or
        org_id, never both; omit for an organization-bound key.
  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
    PlatformOrgName:
      type: string
      pattern: ^[A-Za-z0-9][A-Za-z0-9-]{0,38}$
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-coderabbitai-api-key
      description: >-
        See [Authentication](/api/authentication) for the key types and where to
        create a key.

````

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