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

# Search audit events

> The audit events that match a filter: a condition, or an `and`/`or` group of them. Fields: `source` (app, rest, mcp, agent-studio, bulk-file), `actor_type`, `actor_user_id`, `object_type`, `object_id`, `action`, `status` and `request_id` take `eq`, `neq`, `in` and `nin`; `action_happened_at` (RFC 3339) takes `gt`, `gte`, `lt` and `lte`.



## OpenAPI

````yaml /api/statisfy-api.openapi.json post /v1/audit-logs/search
openapi: 3.1.0
info:
  description: >-
    The agent-first Statisfy API. Authenticate with an API key (`Authorization:
    Bearer stfy_live_…`), then call `GET /v1/meta/capabilities` to discover
    every operation and its schemas.
  title: Statisfy API
  version: 1.0.0
servers:
  - url: https://api.statisfy.com
    description: Production
security: []
paths:
  /v1/audit-logs/search:
    post:
      tags:
        - audit_logs
      summary: Search audit events
      description: >-
        The audit events that match a filter: a condition, or an `and`/`or`
        group of them. Fields: `source` (app, rest, mcp, agent-studio,
        bulk-file), `actor_type`, `actor_user_id`, `object_type`, `object_id`,
        `action`, `status` and `request_id` take `eq`, `neq`, `in` and `nin`;
        `action_happened_at` (RFC 3339) takes `gt`, `gte`, `lt` and `lte`.
      operationId: audit_logs_search
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                cursor:
                  anyOf:
                    - type: string
                    - type: 'null'
                  default: null
                  description: '`next_cursor` from the previous page'
                  title: Cursor
                filter:
                  anyOf:
                    - $ref: '#/components/schemas/FilterCondition'
                    - $ref: '#/components/schemas/FilterGroup'
                    - type: 'null'
                  default: null
                  description: A condition, or an 'and'/'or' group of them
                  title: Filter
                limit:
                  default: 100
                  maximum: 200
                  minimum: 1
                  title: Limit
                  type: integer
              type: object
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page_AuditEvent_'
          description: Successful Response
      security:
        - HTTPBearer: []
components:
  schemas:
    FilterCondition:
      additionalProperties: false
      properties:
        field:
          title: Field
          type: string
        op:
          enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - in
            - nin
            - contains
            - not_contains
            - starts_with
            - ends_with
            - exists
            - not_exists
          title: Op
          type: string
        value:
          default: null
          title: Value
      required:
        - field
        - op
      title: FilterCondition
      type: object
    FilterGroup:
      additionalProperties: false
      properties:
        and:
          anyOf:
            - items:
                anyOf:
                  - $ref: '#/components/schemas/FilterCondition'
                  - $ref: '#/components/schemas/FilterGroup'
              type: array
            - type: 'null'
          default: null
          title: And
        or:
          anyOf:
            - items:
                anyOf:
                  - $ref: '#/components/schemas/FilterCondition'
                  - $ref: '#/components/schemas/FilterGroup'
              type: array
            - type: 'null'
          default: null
          title: Or
      title: FilterGroup
      type: object
    Page_AuditEvent_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/AuditEvent'
          title: Data
          type: array
        has_more:
          default: false
          title: Has More
          type: boolean
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
      required:
        - data
      title: Page[AuditEvent]
      type: object
    AuditEvent:
      properties:
        action:
          description: >-
            What was called: a route (PATCH /opportunity/{opportunity_id}), an
            API operation (opportunities.update) or an event
            (bulk-file-processing-ended)
          title: Action
          type: string
        action_happened_at:
          format: date-time
          title: Action Happened At
          type: string
        actor_id:
          description: The Clerk user id, the API key id, or the worker, flow or job id
          title: Actor Id
          type: string
        actor_name:
          anyOf:
            - type: string
            - type: 'null'
          description: The person's or the API key's name, when known
          title: Actor Name
        actor_type:
          description: user, service (an API key), worker, staff, flow or job
          title: Actor Type
          type: string
        attribute_names:
          additionalProperties:
            type: string
          description: >-
            For an attribute whose value is a record's id (cust_id, owner_id,
            …): that record's name
          title: Attribute Names
          type: object
        attributes:
          additionalProperties:
            anyOf:
              - type: string
              - type: 'null'
          description: >-
            Each field the call stored and its value (at most 100 characters);
            null: cleared
          title: Attributes
          type: object
        id:
          description: 'The event''s id: its first audit_log row'
          title: Id
          type: string
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          description: The API key, worker or run ids, and the call's latency
          title: Metadata
        object_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Object Id
        object_name:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The record's name: an account, opportunity, contact or view that
            still exists, or the name a delete stored
          title: Object Name
        object_type:
          anyOf:
            - type: string
            - type: 'null'
          description: account, opportunity, contact, view, field, csv_import, portal, …
          title: Object Type
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
        source:
          anyOf:
            - type: string
            - type: 'null'
          description: app, rest (the API), mcp, agent-studio or bulk-file
          title: Source
        status:
          description: The HTTP status of the call
          title: Status
          type: string
      required:
        - id
        - action
        - action_happened_at
        - source
        - actor_type
        - actor_id
        - actor_name
        - object_type
        - object_id
        - object_name
        - status
        - request_id
        - attributes
        - metadata
      title: AuditEvent
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http
      description: >-
        An API key, sent as `Authorization: Bearer stfy_live_…`. See
        [Authentication](/rest-api/authentication) for how to get one and which
        scopes it needs.

````

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