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
integrationConfigId*string
Formatuuid
eventType*string
filter?

Draft content filter to dry-run against each returned sample. When supplied, the response's per-sample WouldFire reports whether the live trigger would have fired on that payload at dispatch time. Null filter means "fire always" — every WouldFire is true.

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