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

# Search events with filtering and pagination

> For technical personnel to search and analyze events across the system. Allows searching, filtering, and paginating through events independent of ticket ID. Technical information is always included in the results.



## OpenAPI

````yaml https://dev.enneo.dev/api/mind/docs/open-api post /event/search
openapi: 3.0.0
info:
  version: '1'
  title: enneo.MIND API
  description: This describes the API of enneo Mind, the main ticketing backend
  contact:
    name: enneo GmbH
    email: richard@enneo.ai
  license:
    name: Proprietary software
    url: https://enneo.ai
servers:
  - url: https://demo.enneo.ai/api/mind
    description: Production server, demo client
  - url: https://main.enneo.dev/api/mind
    description: Development main branch
  - url: http://localhost:8005/api/mind
    description: Local development server
security:
  - bearerAuth:
      - api
  - cookieAuth:
      - api
paths:
  /event/search:
    post:
      tags:
        - Event
      summary: Search events with filtering and pagination
      description: >-
        For technical personnel to search and analyze events across the system.
        Allows searching, filtering, and paginating through events independent
        of ticket ID. Technical information is always included in the results.
      operationId: searchEvents
      parameters:
        - name: offset
          in: query
          description: Pagination offset
          required: false
          schema:
            type: integer
            default: 0
        - name: limit
          in: query
          description: Number of items to return (max 100)
          required: false
          schema:
            type: integer
            default: 20
            maximum: 100
        - name: orderByField
          in: query
          description: Field to sort by (only indexed fields are supported)
          required: false
          schema:
            type: string
            enum:
              - e.id
              - e.type
              - e.subType
              - e.contractId
              - e.ticketId
              - e.status
              - e.createdAt
              - e.createdBy
            default: e.createdAt
        - name: orderByDirection
          in: query
          description: Sort direction
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: includeTraces
          in: query
          description: Whether to include event traces in the response
          required: false
          schema:
            type: boolean
            default: true
        - name: format
          in: query
          description: >-
            Response format. 'formatted' returns processed events with typed
            data and transformations. 'raw' returns raw database objects with
            JSON fields decoded but without additional postprocessing.
          required: false
          schema:
            type: string
            enum:
              - formatted
              - raw
            default: formatted
      requestBody:
        description: Filters for searching events
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                filters:
                  type: array
                  description: >
                    Array of filter objects for searching events. Supported
                    filter fields (indexed fields only): e.id, e.type,
                    e.subType, e.contractId, e.ticketId, e.status, e.createdAt,
                    e.createdBy Note: e.subType can only be used in combination
                    with e.type due to the way the database is indexed.

                    Supported comparators: - "=" (equals) - "!=" (not equals) -
                    ">" (greater than) - "<" (less than) - ">=" (greater than or
                    equal) - "<=" (less than or equal) - "in" (in list, use with
                    'values' array) - "between" (between range, use with 'from'
                    and 'to')

                    Special key 'q': - A filter with key 'q' will search across
                    all JSON data fields (data, outcome, hookOutcome) - Example:
                    {"key":"q","comparator":"equal","value":"abc"} searches for
                    "abc" in all JSON fields - Must be used with at least one
                    other non-LIKE filter (e.g. status, id, date) - An exception
                    will be thrown if used without other non-LIKE filters - The
                    'value' parameter is required

                    Special date values for date comparisons: - "CURRENT_TIME" -
                    Current time - "CURRENT_DATE" - Current date - "-1 DAY" -
                    Yesterday - "1 DAY" - Tomorrow - "-1 HOUR" - One hour ago -
                    "1 HOUR" - One hour from now

                    Example: -
                    {"filters":[{"key":"e.ticketId","value":"8","comparator":"="},{"key":"e.type","values":["TicketUpdated"],"comparator":"in"}]}
                  items:
                    $ref: '#/components/schemas/Filter'
            example:
              filters:
                - key: e.status
                  comparator: in
                  values:
                    - open
                    - closed
                - key: e.createdAt
                  comparator: between
                  from: '2023-01-01'
                  to: '2023-12-31'
                - key: q
                  comparator: equal
                  value: abc
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  events:
                    type: array
                    items:
                      $ref: '#/components/schemas/EventActivity'
                  pagination:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total number of matching events
                      offset:
                        type: integer
                        description: Current pagination offset
                      limit:
                        type: integer
                        description: Current pagination limit
              examples:
                formatted:
                  summary: Response with format=formatted (default)
                  value:
                    events:
                      - id: 3665
                        type: ticketUpdated
                        subType: null
                        status: closed
                        data: null
                        user:
                          id: 2
                          email: alice@enneo.dev
                          gender: female
                          firstName: Alice
                          lastName: Anderson
                          companyIds:
                            - 1
                          image: null
                          type: user
                        createdAt: '2026-01-13 18:28:51'
                        activity: closed the ticket
                        ticketId: 8
                        details:
                          - label: Event ID
                            value: '3665'
                            tooltip: null
                            url: null
                            type: string
                          - label: Event type
                            value: ticketUpdated
                            tooltip: null
                            url: null
                            type: string
                          - label: Duration (s)
                            value: '0.018'
                            tooltip: null
                            url: null
                            type: string
                          - label: Trace-ID
                            value: ee0897510b4f0ef773dd007d2e6dda66
                            tooltip: null
                            url: >-
                              https://signoz.enneo.ai/trace/ee0897510b4f0ef773dd007d2e6dda66
                            type: string
                        tabs: []
                        showToUser: true
                        eventTraces: []
                    pagination:
                      total: 3
                      offset: 0
                      limit: 1
                raw:
                  summary: Response with format=raw
                  value:
                    events:
                      - id: 3665
                        type: ticketUpdated
                        subType: null
                        data:
                          status: closed
                          oldValues:
                            status: open
                        contractId: '715559'
                        ticketId: 8
                        status: closed
                        outcome:
                          tagsAssigned: []
                          refreshScheduled: false
                          webhooksExecuted: []
                        hookOutcome: null
                        retries: 0
                        traceIdCreation: ee0897510b4f0ef773dd007d2e6dda66
                        traceIdExecution: ee0897510b4f0ef773dd007d2e6dda66
                        duration: 0.018003
                        createdBy: 2
                        createdAt: '2026-01-13 18:28:51'
                        modifiedAt: '2026-01-13 18:28:51'
                        traces: []
                    pagination:
                      total: 3
                      offset: 0
                      limit: 1
        '403':
          description: Forbidden - Insufficient permissions
      security:
        - bearerAuth: []
components:
  schemas:
    Filter:
      type: object
      properties:
        key:
          type: string
          enum:
            - t.id
            - t.channel
            - t.subchannelId
            - t.channelId
            - t.direction
            - t.status
            - t.priority
            - t.agentId
            - t.customerId
            - t.contractId
            - t.partnerId
            - t.isCustomerActive
            - t.aiSupportLevel
            - i.aiAgentId
            - t.createdAt
            - t.modifiedAt
            - t.firstResponseDueBy
            - t.dueBy
            - t.lastMessageAt
            - t.lastCustomerMessageAt
            - tt.tagId
            - t.sentiment
            - t.language
            - t.languageCode
            - t.modelRunAt
            - t.externalTicketId
            - t.from
            - t.spamStatus
            - w.id
            - q
          example: channel
        comparator:
          type: string
          description: >-
            Possible values: =, !=, >, >=, <, <=, in, not in, between, not
            between
          example: in
        values:
          type: array
          description: >-
            Used for "in" and "not in" comparators.


            Include the sentinel string `null` to match SQL NULL rows together
            with other values:

            - `in` + `["null", "a"]` → `(col IS NULL OR col IN ('a'))`
            (whitelist)

            - `not in` + `["null", "a"]` → `(col IS NULL OR col NOT IN ('a'))`
            (blacklist complement)

            - `["null"]` only → `col IS NULL` (`in`) or `col IS NOT NULL` (`not
            in`)


            Example: backlog not-spam filter uses `in` with `["null",
            "auto_clean", "manual_clean"]`; spam filter uses `in` with spam
            statuses only.
          items:
            type: string
            example: email
        value:
          type: string
          description: Used for "=", "!=", ">", ">=", "<", "<=" comparators
          example: 1609459200
        from:
          type: string
          description: Used for "between" and "not between" comparators
          example: 1609459200
        to:
          type: string
          description: Used for "between" and "not between" comparators
          example: 1612051200
    EventActivity:
      type: object
      properties:
        id:
          type: integer
          description: Event ID
        status:
          type: string
          description: Event status
          enum:
            - open
            - closed
            - error
            - deleted
            - processing
        user:
          type: object
          description: User who created the event
          properties:
            id:
              type: integer
            firstName:
              type: string
            lastName:
              type: string
            email:
              type: string
            phone:
              type: string
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
        activity:
          type: string
          description: Localized description of the event
        details:
          type: array
          description: Additional details for this event
          items:
            type: object
            properties:
              label:
                type: string
              value:
                type: string
              type:
                type: string
              url:
                type: string
        tabs:
          type: array
          description: Tabs to show in the activity log
          items:
            type: object
            properties:
              key:
                type: string
              label:
                type: string
        eventTraces:
          type: array
          description: Additional traces associated with this event
          items:
            type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT-based authentication
      x-scopes:
        api: Full access to the API
    cookieAuth:
      type: apiKey
      in: cookie
      name: connect.sid
      description: Cookie-based authentication
      x-scopes:
        api: Full access to the API

````