Skip to main content
POST
/
log_search
curl --request POST \
  --url https://api.kapso.ai/platform/v1/log_search \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "query": "flow-execution-1",
  "period": "7d",
  "source": "flow_event",
  "filters": {
    "flow_execution_id": "flow-execution-1",
    "event_type": "step_failed"
  }
}
'
{
  "data": {
    "available": true,
    "source": "flow_event",
    "window": {
      "since": "2026-07-01T12:00:00Z",
      "until": "2026-07-07T12:00:00Z"
    },
    "events": [
      {
        "id": "evt_2",
        "source": "flow_event",
        "timestamp": "2026-07-07T11:58:00Z",
        "message": "Flow Event step_failed agent_1",
        "flow_execution_id": "flow-execution-1",
        "flow_event_id": "flow-event-1",
        "step_identifier": "agent_1",
        "step_type": "FlowAgentStep",
        "error_message": "Tool call failed"
      }
    ],
    "pagination": {
      "has_more": false,
      "next_cursor": null
    }
  }
}

Authorizations

X-API-Key
string
header
required

Body

application/json
query
string
period
enum<string>
default:24h
Available options:
24h,
7d,
context
source
enum<string>
default:all
Available options:
all,
external_api_log,
whatsapp_webhook_event,
flow_event,
webhook_delivery
problems_only
boolean
default:false
errors_only
boolean
default:false
deprecated

Alias for problems_only.

limit
integer
default:50
Required range: 1 <= x <= 100
cursor
string

Cursor returned as pagination.next_cursor from a previous response.

around
string<date-time>

Center a context search around this timestamp. Use with period=context.

highlight_event_id
string

Include this event in the page when available.

highlight_resource_id
string

Include an event for this resource in the page when available.

filters
object
Example:
{ "flow_execution_id": "flow-execution-1" }

Response

Success

data
object
required