FruxonDocs
Agent NetworkTriggers

Creates a new trigger in an Application and optionally binds it to agents atomically.

Creates the trigger together with any initial agent bindings supplied in the request, in a single transaction. The trigger `Kind` (schedule, webhook, or integration event) is fixed at creation — changing it later requires recreating the trigger, since each kind carries its own configuration shape. The owning Application is the `network` path segment. Every trigger belongs to exactly one, and an unowned trigger would be listed by no Application while still firing, so ownership is part of the address rather than an omittable body field. The created trigger is read and edited on the flat `{tenant}/triggers/{trigger}` tree, which is where the Location header points.

POST
/v1/tenants/{tenant}/networks/{network}/triggers
AuthorizationBearer <token>

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

In: header

Path Parameters

network*string

The Application (Network) that will own the trigger.

Formatuuid
tenant*string

The tenant identifier

The trigger configuration and initial agent bindings.

kind?string

Discriminates between the different ways a trigger can fire an agent. TriggerKind.Schedule (cron / interval) and TriggerKind.IntegrationEvent (events emitted by a configured integration — Slack messages, GitHub pull requests, inbound Gmail / Outlook mail, …) are both implemented and fire agents in production. TriggerKind.Webhook is the only value still reserved: no dispatcher consumes it yet, and it exists so the wire format stays stable when that work lands.

Value in"UNSPECIFIED" | "SCHEDULE" | "WEBHOOK" | "INTEGRATION_EVENT"
integrationId?string|null

Integration id (slack, github, telegram, …) when the trigger sources from one. Null for Schedule and other integration-less kinds.

integrationConfigId?string|null

Optional pin to a specific TenantIntegrationConfig — used when the trigger needs to know which workspace/bot/token to listen on.

Formatuuid
eventType?string|null

For TriggerKind.IntegrationEvent: the descriptor id of the event to listen for (e.g. slack.message.received). Null means "any event from this integration" — the legacy semantic preserved for backward compatibility with rows created before this field landed.

displayName?string|null
active?boolean
timeout?integer
Formatint32
Range60 <= value <= 2147483647
scheduleFrequency?string
Value in"UNSPECIFIED" | "DAILY" | "WEEKLY" | "MONTHLY" | "INTERVAL"
scheduleDay?string
Value in"UNSPECIFIED" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY"
scheduleDays?|null

The days of the week a ScheduleFrequency.Weekly schedule fires on (e.g. SUNDAY..THURSDAY). When non-empty this is the authoritative set; the scalar CreateTriggerRequest.ScheduleDay is derived from its first day. Only valid for Weekly; no duplicates. Null/empty uses the scalar day.

scheduleDayOfMonth?integer|null

Day of the month for monthly schedules: 1..31 for a specific day, or -1 for the last day of the month (RFC 5545 BYMONTHDAY convention). Service-layer validation rejects 0 and out-of-range values.

Formatint32
scheduleHour?string|null
scheduleMinute?string|null
scheduleTimes?|null

Multiple intra-day fire times for a ScheduleFrequency.Daily or ScheduleFrequency.Weekly schedule. When non-empty this is the authoritative set of times; the scalar CreateTriggerRequest.ScheduleHour/CreateTriggerRequest.ScheduleMinute are derived from the first slot. Only valid for Daily/Weekly; entries must be ≥30 minutes apart. Null/empty uses the scalar time.

intervalValue?integer|null
Formatint32
intervalUnit?string
Value in"UNSPECIFIED" | "MINUTES" | "HOURS" | "DAYS"
timezone?string|null
filter?

Optional content predicate for TriggerKind.IntegrationEvent triggers — only events whose payload matches are forwarded to the bound agents. Rejected on non-integration-event kinds. Null (or no conditions) fires always. See Triggers.TriggerEventFilter.

workShape?

Optional work shape whose source items are admitted to a durable ledger. Currently supported only for SCHEDULE triggers. Null for an ordinary trigger that fires an agent.

outcomeDigest?

How often this automation reports what its work came to, and at what hour. Omit for the default — daily at 08:00 in the automation's own timezone.

agentIds?array<string>

Legacy bindings field — agent ids only, no parameter mappings. When CreateTriggerRequest.Bindings is non-empty, this is ignored. Kept for one release so existing CLI / dashboard clients keep working until they migrate to the structured shape. The service expands each id into a binding with an empty parameter-mapping list; the operator wires inputs explicitly on the Mappings tab.

bindings?

Agents to bind to this trigger on creation, with each binding's payload→parameter mappings. May be empty. When non-empty, the trigger and its bindings are created atomically — a failure mid-way leaves no orphaned trigger row. Takes precedence over CreateTriggerRequest.AgentIds.

[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/networks/497f6eca-6276-4993-bfeb-53cbbbba6f08/triggers" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "00000000-0000-0000-0000-000000000000",
  "networkId": "00000000-0000-0000-0000-000000000000",
  "kind": "SCHEDULE",
  "integrationId": "string",
  "integrationConfigId": "00000000-0000-0000-0000-000000000000",
  "eventType": "string",
  "displayName": "string",
  "active": false,
  "timeout": 0,
  "scheduleFrequency": "DAILY",
  "scheduleDay": "MONDAY",
  "scheduleDays": [
    "MONDAY"
  ],
  "scheduleDayOfMonth": 0,
  "scheduleHour": "string",
  "scheduleMinute": "string",
  "scheduleTimes": [
    {
      "hour": 0,
      "minute": 0
    }
  ],
  "intervalValue": 0,
  "intervalUnit": "MINUTES",
  "timezone": "string",
  "filter": {
    "match": "ALL",
    "conditions": [
      {
        "path": "string",
        "operator": "UNSPECIFIED",
        "value": "string",
        "values": null,
        "caseSensitive": false
      }
    ]
  },
  "workShape": {
    "door": {
      "doorId": "string",
      "integrationConfigId": "string",
      "query": "string",
      "parameters": {},
      "startFrom": 0,
      "skipWhen": {
        "match": "UNSPECIFIED",
        "conditions": []
      },
      "projection": [
        "string"
      ]
    },
    "source": {
      "kind": "TOOL",
      "ragAssetId": "string",
      "ragReadMode": "DOCUMENTS",
      "ragSearch": "string",
      "pageSize": 0,
      "integrationConfigId": "string",
      "integrationId": "string",
      "listToolId": "string",
      "getToolId": "string",
      "recordsPath": "string",
      "cursorParamName": "string",
      "totalPath": "string",
      "pageOrder": "SOURCE_ORDER",
      "parameters": {},
      "itemIdPath": "string",
      "itemVersionPath": "string",
      "previousVersionField": "string",
      "sinkTargetPath": "string",
      "sinkTargetKind": "ROW",
      "skipWhen": {
        "match": "UNSPECIFIED",
        "conditions": []
      },
      "sourceUrlPath": "string",
      "cursorPath": "string",
      "watermarkParamName": "string",
      "watermarkFormat": "RAW",
      "overlapWindowMs": 0,
      "startFrom": 0,
      "flattenSheetRows": false
    },
    "onDemand": {
      "keyPaths": [
        "string"
      ],
      "labelPaths": [
        "string"
      ],
      "inputs": [],
      "tool": {
        "enabled": false,
        "description": "string"
      },
      "agentsMayStart": false
    },
    "stages": [
      {
        "id": "string",
        "displayName": "string",
        "kind": "UNSPECIFIED",
        "agentId": "string",
        "instruction": "string",
        "ask": null,
        "wait": null,
        "batch": null,
        "sink": null,
        "actionTypeCeiling": null,
        "claimLimit": null,
        "maxRunning": null,
        "parameters": [],
        "produces": [],
        "requires": [],
        "dedupeKey": [],
        "routes": [],
        "ignoreReasons": []
      }
    ],
    "parameters": [
      {
        "name": "string",
        "value": "string",
        "description": "string"
      }
    ],
    "policy": {
      "claimLimit": 0,
      "maxAttempts": 0,
      "leaseSeconds": 0,
      "actionTypeCeiling": "READ_ONLY",
      "itemCostCapUsd": 0,
      "effectiveClaimLimit": 1,
      "effectiveMaxAttempts": 1,
      "effectiveLeaseSeconds": 1
    },
    "outcomeUnit": {
      "singular": "string",
      "plural": "string"
    },
    "cohorts": {
      "window": "DAY",
      "settleWithinHours": 0,
      "confirmAboveCredits": 0,
      "followUp": []
    }
  },
  "outcomeDigest": {
    "frequency": "DAILY",
    "sendHour": 0,
    "report": {
      "agentId": "string",
      "contactSlot": "string",
      "labelPaths": [
        "string"
      ],
      "isComplete": true,
      "effectiveLabelPaths": [
        "string"
      ]
    }
  },
  "createdAt": 0,
  "modifiedAt": 0,
  "lastFiredAt": 0,
  "hasWebhookKey": false,
  "webhookOwnership": "PER_BINDING",
  "agentIds": [
    "string"
  ],
  "bindings": [
    {
      "agentId": "string",
      "parameterMappings": [],
      "environmentSlug": "string",
      "outputBindingId": "00000000-0000-0000-0000-000000000000",
      "outputDestination": {
        "bindingId": "00000000-0000-0000-0000-000000000000",
        "participantId": "00000000-0000-0000-0000-000000000000",
        "integrationConfigId": "00000000-0000-0000-0000-000000000000",
        "provider": "string",
        "address": "string"
      },
      "defaultOutputDestinations": []
    }
  ],
  "warnings": [
    "string"
  ],
  "managedBy": {
    "ownerKind": "KNOWLEDGE_SOURCE",
    "ownerId": "00000000-0000-0000-0000-000000000000",
    "roles": [
      "SOURCE"
    ],
    "ownership": "MANAGED",
    "ownerDisplayName": "string",
    "ownerContainerId": "00000000-0000-0000-0000-000000000000",
    "ownerContainerDisplayName": "string",
    "linkedOwnerCount": 0
  }
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}