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

# Search activity log

> Searches activity log events with filtering by type, severity, caller, date range,
and free-text search on message and metadata. Returns paginated results with
aggregated counts for types, severities, and callers.

## Search Capabilities

* **Type filtering**: Filter by event type (Webhook, ToolCall, ApiRequest, McpCall, Scheduler, WebInterfaceCall)
* **Severity filtering**: Filter by severity level (Info, Warning, Error, Critical)
* **Caller filtering**: Filter by who initiated the action (User, System)
* **Date range filtering**: Filter by event timestamp
* **Agent/Call filtering**: Filter by specific agent IDs or call IDs
* **Full-text search**: Search across event messages and metadata
* **Aggregations**: Get counts grouped by type, severity, and caller

## Search Examples

<CodeGroup>
  ```json Basic Search
  {
    "page": 0,
    "size": 20,
    "sortField": "timestamp",
    "sortDirection": "Descending"
  }
  ```

  ```json Filter by Type and Severity
  {
    "types": ["Webhook", "ToolCall"],
    "severities": ["Error", "Critical"],
    "size": 50
  }
  ```

  ```json Filter by Agent and Date Range
  {
    "agentIds": ["agent-123"],
    "fromDate": "2026-03-01T00:00:00Z",
    "toDate": "2026-03-03T23:59:59Z"
  }
  ```

  ```json Text Search
  {
    "searchText": "timeout",
    "callers": ["System"],
    "size": 100
  }
  ```
</CodeGroup>


## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json post /api/v1/activity-logs/search
openapi: 3.0.4
info:
  title: Dasha BlackBox Agent API
  description: API for managing AI agents and calls
  contact:
    name: DashaAI Team
    email: support@dasha.ai
  version: v1
servers:
  - url: https://blackbox.dasha.ai
    description: Dasha BlackBox Agent API
security:
  - ApiKey: []
  - OAuth: []
tags:
  - name: ActivityLogs
  - name: Agents
  - name: CallResults
  - name: Calls
  - name: Chats
  - name: Copilot
  - name: CustomerData
  - name: Mcp
  - name: Media
  - name: Misc
  - name: PronunciationDictionaries
  - name: Providers
  - name: SipAliases
  - name: SipCredentials
  - name: SipPhoneNumbers
  - name: TextChat
  - name: TwilioProvider
  - name: Voice
  - name: WebhookTest
  - name: WebIntegrations
  - name: WebSocket
    description: WebSocket endpoints for real-time communication
paths:
  /api/v1/activity-logs/search:
    post:
      tags:
        - ActivityLogs
      summary: Search activity log
      description: >-
        Searches activity log events with filtering by type, severity, caller,
        date range,

        and free-text search on message and metadata. Returns paginated results
        with

        aggregated counts for types, severities, and callers.
      requestBody:
        description: Search criteria and options
        content:
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/ActivityLogSearchRequestDto'
              description: >-
                Search parameters for querying activity log events with
                filtering, pagination, and sorting.
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/ActivityLogSearchRequestDto'
              description: >-
                Search parameters for querying activity log events with
                filtering, pagination, and sorting.
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/ActivityLogSearchRequestDto'
              description: >-
                Search parameters for querying activity log events with
                filtering, pagination, and sorting.
      responses:
        '200':
          description: Returns search results successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActivityLogSearchResponseDto'
        '400':
          description: Invalid search parameters or validation errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Authentication failed or API key is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Access denied to organization resources
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '500':
          description: Server error occurred during search
components:
  schemas:
    ActivityLogSearchRequestDto:
      type: object
      properties:
        page:
          type: integer
          description: Page number for pagination, using 0-based indexing. Defaults to 0.
          format: int32
        size:
          maximum: 100
          minimum: 1
          type: integer
          description: Number of activity log events to return per page. Defaults to 20.
          format: int32
        types:
          type: array
          items:
            $ref: '#/components/schemas/ActivityEventType'
          description: >-
            Filter by activity event types (e.g., Webhook, ToolCall,
            ApiRequest).
          nullable: true
        severities:
          type: array
          items:
            $ref: '#/components/schemas/ActivityEventSeverity'
          description: Filter by severity levels (e.g., Error, Critical).
          nullable: true
        callers:
          type: array
          items:
            $ref: '#/components/schemas/ActivityEventCaller'
          description: Filter by caller types (User and/or System).
          nullable: true
        userEmail:
          type: string
          description: Filter by user email address.
          nullable: true
        callIds:
          type: array
          items:
            type: string
          description: Filter by one or more call IDs.
          nullable: true
        agentIds:
          type: array
          items:
            type: string
          description: Filter by one or more agent IDs.
          nullable: true
        fromDate:
          type: string
          description: Start of date range for filtering by timestamp.
          format: date-time
          nullable: true
        toDate:
          type: string
          description: End of date range for filtering by timestamp.
          format: date-time
          nullable: true
        searchText:
          type: string
          description: >-
            Free-text search query that searches the message and metadata
            fields.
          nullable: true
        sortField:
          type: string
          description: Field name to sort results by. Defaults to "timestamp".
          nullable: true
        sortDirection:
          allOf:
            - $ref: '#/components/schemas/SortDirection'
          description: Direction to sort results. Defaults to Descending (newest first).
      additionalProperties: false
      description: >-
        Search parameters for querying activity log events with filtering,
        pagination, and sorting.
    ActivityLogSearchResponseDto:
      required:
        - executionTimeMs
        - page
        - results
        - size
        - totalCount
        - totalPages
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/ActivityLogResponseDto'
          description: Activity log events in the current page.
        totalCount:
          type: integer
          description: >-
            Total number of events matching the search criteria across all
            pages.
          format: int64
        page:
          type: integer
          description: Current page number (0-based).
          format: int32
        size:
          type: integer
          description: Number of results per page.
          format: int32
        totalPages:
          type: integer
          description: Total number of pages available.
          format: int32
        aggregations:
          allOf:
            - $ref: '#/components/schemas/ActivityLogAggregationsDto'
          description: >-
            Aggregated statistics about the search results including counts by
            type, severity, and caller.
          nullable: true
        executionTimeMs:
          type: integer
          description: Search execution time in milliseconds.
          format: int64
      additionalProperties: false
      description: >-
        Search results for activity log events including pagination metadata,
        aggregations, and performance metrics.
    ProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
      additionalProperties: {}
    ActivityEventType:
      enum:
        - AgentCreated
        - AgentUpdated
        - AgentDeleted
        - AgentCloned
        - CallCreated
        - CallBulkScheduled
        - CallCanceled
        - CallCompleted
        - CallFailed
        - CallDeadlineExceeded
        - CallDispatched
        - CallReceived
        - CallRejectedByWebhook
        - WebhookSuccess
        - WebhookFailed
        - ToolCallSuccess
        - ToolCallFailed
        - McpCallExecuted
        - ConfigurationCreated
        - ConfigurationUpdated
        - ConfigurationDeleted
        - CustomerDataRemoved
      type: string
      description: Type of activity log event. Describes the specific action that occurred.
    ActivityEventSeverity:
      enum:
        - Info
        - Warning
        - Error
        - Critical
      type: string
      description: Severity level of an activity log event.
    ActivityEventCaller:
      enum:
        - User
        - System
      type: string
      description: Identifies who initiated the logged action.
    SortDirection:
      enum:
        - Ascending
        - Descending
      type: string
      description: >-
        Sort direction for ordering search results. Determines whether results
        are returned in ascending (oldest/lowest first) or descending
        (newest/highest first) order.
    ActivityLogResponseDto:
      required:
        - caller
        - eventId
        - message
        - orgId
        - severity
        - timestamp
        - type
      type: object
      properties:
        eventId:
          minLength: 1
          type: string
          description: Unique event identifier.
        orgId:
          minLength: 1
          type: string
          description: Organization ID.
        userEmail:
          type: string
          description: User email, if the event was triggered by a user.
          nullable: true
        type:
          allOf:
            - $ref: '#/components/schemas/ActivityEventType'
          description: Type of activity event.
        severity:
          allOf:
            - $ref: '#/components/schemas/ActivityEventSeverity'
          description: Severity level.
        callId:
          type: string
          description: Call ID associated with the event, if applicable.
          nullable: true
        agentId:
          type: string
          description: Agent ID associated with the event, if applicable.
          nullable: true
        message:
          minLength: 1
          type: string
          description: Searchable event message.
        caller:
          allOf:
            - $ref: '#/components/schemas/ActivityEventCaller'
          description: Who initiated the action (User or System).
        metadata:
          description: Arbitrary metadata (webhook payload, timings, etc.).
          nullable: true
        timestamp:
          type: string
          description: Event timestamp.
          format: date-time
      additionalProperties: false
      description: Individual activity log event in a search response.
    ActivityLogAggregationsDto:
      type: object
      properties:
        typeCounts:
          type: object
          additionalProperties:
            type: integer
            format: int64
          description: >-
            Count of events grouped by type. Keys are type names (e.g.,
            "Webhook", "ToolCall"), values are event counts.
          nullable: true
        severityCounts:
          type: object
          additionalProperties:
            type: integer
            format: int64
          description: >-
            Count of events grouped by severity. Keys are severity names (e.g.,
            "Error", "Critical"), values are event counts.
          nullable: true
        callerCounts:
          type: object
          additionalProperties:
            type: integer
            format: int64
          description: >-
            Count of events grouped by caller. Keys are caller names (e.g.,
            "User", "System"), values are event counts.
          nullable: true
      additionalProperties: false
      description: >-
        Aggregated counts for activity log search results grouped by type,
        severity, and caller.
  securitySchemes:
    ApiKey:
      type: http
      description: API Key Authentication (Bearer {key})
      scheme: Bearer
    OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.dasha.ai/connect/authorize
          scopes:
            platform_api: Platform API

````