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

# Search audit events

> Search organization audit events, including API, CLI, MCP, and built-in agent activity.



## OpenAPI

````yaml /openapi/forge-api.yaml get /api/headless/v1/organizations/{organizationId}/audit/events
openapi: 3.0.3
info:
  title: Forge API
  version: 0.1.0
  description: >-
    Automate Forge inventory, investigations, findings, governance, fleet,
    policy, configuration, compliance, MCP, service-account, and audit
    workflows.
servers:
  - url: https://api.forge.ai
    description: Forge production API
security:
  - serviceAccountBearer: []
tags:
  - name: approvals
    description: MCP approvals
  - name: audit
    description: Audit
  - name: capabilities
    description: Capabilities
  - name: compliance
    description: Compliance
  - name: findings
    description: Findings
  - name: fleet
    description: Fleet
  - name: governance
    description: Governance
  - name: inventory
    description: Inventory
  - name: investigation
    description: Investigations
  - name: managed-config
    description: Managed configuration
  - name: mcp
    description: MCP sessions
  - name: mcp-registry
    description: MCP and skill registry
  - name: operations
    description: operations
  - name: policies
    description: Policies and violations
  - name: service-accounts
    description: Service accounts
  - name: settings
    description: Automation settings
paths:
  /api/headless/v1/organizations/{organizationId}/audit/events:
    get:
      tags:
        - audit
      summary: Search audit events
      description: >-
        Search organization audit events, including API, CLI, MCP, and built-in
        agent activity.
      operationId: searchHeadlessAuditEvents
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 200
        - name: offset
          in: query
          schema:
            type: integer
            minimum: 0
        - name: cursor
          in: query
          schema:
            type: string
        - name: action
          in: query
          schema:
            type: string
        - name: actorType
          in: query
          schema:
            type: string
        - name: actorConsoleUserId
          in: query
          schema:
            type: string
        - name: targetType
          in: query
          schema:
            type: string
        - name: targetId
          in: query
          schema:
            type: string
        - name: occurredAfter
          in: query
          schema:
            type: string
            format: date-time
        - name: occurredBefore
          in: query
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Organization audit events visible to the current headless actor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HeadlessAuditEventListResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
components:
  parameters:
    OrganizationId:
      name: organizationId
      in: path
      required: true
      schema:
        type: string
  schemas:
    HeadlessAuditEventListResponse:
      type: object
      required:
        - events
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/HeadlessAuditEvent'
        totalCount:
          type: integer
        nextCursor:
          type: string
    HeadlessAuditEvent:
      type: object
      required:
        - id
        - organizationId
        - action
        - actorType
        - beforeValues
        - afterValues
        - metadata
        - occurredAt
        - createdAt
      properties:
        id:
          type: string
        organizationId:
          type: string
        action:
          type: string
        actorType:
          type: string
        actorConsoleUserId:
          type: string
        actorRole:
          type: string
        actorDisplay:
          type: string
        targetType:
          type: string
        targetId:
          type: string
        targetDisplay:
          type: string
        beforeValues:
          type: object
          additionalProperties: true
        afterValues:
          type: object
          additionalProperties: true
        metadata:
          type: object
          additionalProperties: true
        requestId:
          type: string
        ipAddress:
          type: string
        userAgent:
          type: string
        occurredAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
  responses:
    Error:
      description: Stable Forge error envelope.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
  securitySchemes:
    serviceAccountBearer:
      type: http
      scheme: bearer
      bearerFormat: Forge service-account or delegated OAuth access token
      description: >-
        Enter a Forge service-account token or delegated OAuth access token.
        Mintlify adds the Bearer prefix.

````