FruxonDocs
Agent NetworkTriggers

Lists recent source events for an unsaved trigger draft.

Returns the last N items the source mailbox or workspace would have matched, annotated with whether the draft filter would have fired on each. This backs the create-flow panel before a trigger row exists. It is read-only — no upstream writes, no trigger persistence, no agent enqueue. The capability is per-`(integration, eventType)`; pairs without a registered `IRecentEventSource` return 400. See `docs/design/agent-network.md §13`.

POST
/v1/tenants/{tenant}/triggers:testRecentEvents
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

tenant*string

The tenant identifier

integrationId*string|null
integrationConfigId*string
Formatuuid
eventType*string|null
filter?

Operator-defined content predicate on an Fruxon.Model.Triggers.TriggerKind.IntegrationEvent trigger. The structural match (integration / config / event type) decides whether an inbound event reaches a trigger at all; the filter decides whether a matched event actually fires the bound agents. A null filter — or one with no conditions — fires always, so every pre-existing trigger is unaffected. Evaluated by Fruxon.Model.Triggers.TriggerEventFilterEvaluator against the inbound payload.* envelope, once per trigger, before the binding fan-out (see Fruxon.Model.Triggers.IntegrationEventDispatcher). Stored as JSONB on the trigger and snapshotted into Fruxon.Model.Triggers.TriggerRevision.

limit?integer|null

How many recent items to fetch (capped server-side).

Formatint32
scope?|null

Optional per-source narrowing hints. Gmail / Outlook ignore this. Slack reads scope["channel_id"] to target one channel; when omitted the Slack source aggregates the bot's accessible channels.

[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/triggers:testRecentEvents" \  -H "Content-Type: application/json" \  -d '{    "integrationId": "string",    "integrationConfigId": "928c9032-93b2-49a3-82db-be1a31402d0e",    "eventType": "string"  }'
{
  "samples": [
    {
      "upstreamId": "string",
      "occurredAtMs": 0,
      "label": "string",
      "payload": {
        "source": "UNSPECIFIED",
        "eventType": "string",
        "body": {}
      },
      "wouldFire": false
    }
  ]
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
Empty