FruxonDocs
Agent NetworkTriggers

Creates a new trigger and optionally binds it to a set of 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.

POST
/v1/tenants/{tenant}/triggers
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

kind?string

Discriminates between the different ways a trigger can fire an agent. Fruxon.Model.Triggers.TriggerKind.Schedule (cron / interval) and Fruxon.Model.Triggers.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. Fruxon.Model.Triggers.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 Fruxon.Model.Triggers.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

Frequency of a schedule trigger. Wire form is UPPER_SNAKE per project convention; Unspecified = 0 is the AIP-126 zero-sentinel.

Value in"UNSPECIFIED" | "DAILY" | "WEEKLY" | "MONTHLY" | "INTERVAL"
scheduleDay?string

Day of the week, used by weekly schedules (chat-user tasks, triggers, asset auto-update polls). Matches google.type.DayOfWeek exactly: Unspecified=0, Monday=1..Sunday=7. The wire form is UPPER_SNAKE per AIP-126 and the project's enum convention.

This is a deliberate divergence from System.DayOfWeek (which numbers Sunday=0..Saturday=6 and has no Unspecified sentinel). The BCL enum is the right C# type for "what day is System.DateTime on?", but the wrong type for an externally-visible recurrence field — it can't carry [JsonConverter] at the type level (we don't own mscorlib), so its wire form has to be patched via property-level attributes everywhere, which is exactly the carve-out this enum retires. Use M:Fruxon.Model.Jobs.WeekDayExtensions.ToBclDayOfWeek(Fruxon.Model.Jobs.WeekDay) to convert at the scheduler comparison sites where you need to compare against System.DateTime.DayOfWeek.

Value in"UNSPECIFIED" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY" | "SUNDAY"
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
intervalValue?integer|null
Formatint32
intervalUnit?string

Unit for the spacing of a recurring Fruxon.Model.Jobs.ScheduleFrequency.Interval job. Wire form is UPPER_SNAKE per project convention; Unspecified = 0 is the AIP-126 zero-sentinel.

Value in"UNSPECIFIED" | "MINUTES" | "HOURS" | "DAYS"
timezone?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.

agentIds?|null

Legacy bindings field — agent ids only, no parameter mappings. When Fruxon.Model.Triggers.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?|null

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 Fruxon.Model.Triggers.CreateTriggerRequest.AgentIds.

pipelineId?string|null

Target a collection pipeline instead of agents: when set, this is a schedule trigger that starts a run of the given pipeline when due (design §6 WS5). Mutually exclusive with Fruxon.Model.Triggers.CreateTriggerRequest.AgentIds / Fruxon.Model.Triggers.CreateTriggerRequest.Bindings, and only valid for Fruxon.Model.Triggers.TriggerKind.Schedule.

Formatuuid
[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/triggers" \  -H "Content-Type: application/json" \  -d '{}'
{
  "id": "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",
  "scheduleDayOfMonth": 0,
  "scheduleHour": "string",
  "scheduleMinute": "string",
  "intervalValue": 0,
  "intervalUnit": "MINUTES",
  "timezone": "string",
  "filter": {
    "match": "ALL",
    "conditions": [
      {
        "path": "string",
        "operator": "UNSPECIFIED",
        "value": "string",
        "values": null,
        "caseSensitive": false
      }
    ]
  },
  "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": []
    }
  ],
  "pipelineId": "00000000-0000-0000-0000-000000000000"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
Empty
Empty