On this page
Sommatic Docs
Open portal

Triggers Beta

Start workflows from webhooks and other workflows, and manage ingress bindings.

View as Markdown
Open in

Trigger a workflow via chain invocation

POST /workflow-orchestration/trigger/chain/{mode}

Dispatches a workflow execution from another workflow's chain node. Resolves the target workflow by slug or definition ID. The mode determines whether the test (draft) or production (published version) is executed.

Authentication: Bearer token

Parameters

mode string path Required

Execution mode. "test" executes the draft, "prod" executes the published version.

testprod

Request body

Chain invocation payload with target workflow and input data.

organization_id string Required

The organization scope for the target workflow.

target_flow_slug string

The slug of the target workflow to invoke.

target_flow_definition_id string

Explicit flow definition ID. Takes precedence over slug.

execution_mode string

Sync waits for completion. Async returns immediately.

Allowed values syncasync
data object

Input data to pass to the target workflow.

chain_context object

Traceability metadata from the calling workflow.

caller_flow_instance_id string
caller_flow_slug string
caller_node_id string
correlation_id string

Responses

  • 200 Workflow executed successfully (sync mode).
  • 202 Workflow dispatched (async mode).
  • 404 Target workflow not found.
  • 500 Internal Server Error.
curl -X POST https://api.sommatic.ai/workflow-orchestration/trigger/chain/test \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "<organization_id>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {}
}

dispatchChainStream (/workflow-orchestration/trigger/chain/:mode/stream)

POST /workflow-orchestration/trigger/chain/{mode}/stream

Authentication: Bearer token

Parameters

mode string path Required

Responses

curl -X POST https://api.sommatic.ai/workflow-orchestration/trigger/chain/<mode>/stream \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -N

Trigger a workflow via webhook

POST /workflow-orchestration/trigger/webhooks/{mode}/{bindingIdentifier}

External entry point to execute a workflow from any system capable of issuing an HTTP POST. The request is resolved to an IngressBinding by id or custom slug, and its target FlowDefinition is dispatched to the orchestrator.

The raw HTTP request is forwarded to the workflow as its initial $input with the shape { body, headers, query, method }. Downstream nodes access the POSTed payload via {{ $json.body.<field> }} or by upstream-node reference {{ $('Webhook Receiver').item.json.body.<field> }}.

By default the call is synchronous and returns the full orchestrator result. For long-running workflows, set execution_mode=async — the response returns immediately with an instance_id, and progress can be followed via the SSE channel at /workflow-orchestration/execution/stream.

The endpoint is unauthenticated by design. Per-binding authentication (shared secret, signature verification, IP allow-list) is a concern of the IngressBinding configuration, not of this route.

Authentication: Authenticated by the ingress binding

Parameters

mode string path Required

`test` runs the draft; `prod` runs the latest published version.

testprod

bindingIdentifier string path Required

`IngressBinding` id (preferred) or its custom slug.

execution_mode string query

Override the default `sync` behavior with `async` for long-running flows.

syncasync

Request body

Arbitrary JSON payload. The full JSON becomes `$json.body` inside the workflow. Two convenience keys are read back from the body when present: `event` (routing hint) and `execution_mode` (same behavior as the query param).

Responses

  • 202 Accepted. In `sync` mode the response contains the final orchestrator result. In `async` mode it returns immediately with `status: running` and the `instance_id` to track via the SSE stream.
  • 400 Missing or invalid path/query parameters.
  • 404 `IngressBinding` not found, or its target `FlowDefinition` does not resolve to an existing workflow. In `prod` mode also returned when no default version is published.
  • 413 Request body exceeded the per-route limit (5 MB).
  • 500 Orchestrator unreachable or unhandled error during dispatch.
curl -X POST https://api.sommatic.ai/workflow-orchestration/trigger/webhooks/test/<bindingIdentifier> \
  -H "Content-Type: application/json" \
  -d '{}'
Response
{
  "status": 202,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "instance": {
      "id": "wf-flow-instance-xxx",
      "status": "completed"
    },
    "steps": [
      {
        "nodeId": "node-001",
        "operatorSlug": "webhook.trigger",
        "status": "success",
        "port": "out",
        "durationMs": 2
      }
    ]
  }
}

Create a new ingress binding.

POST /workflow-orchestration/triggers/ingress-binding/

Returns the created Ingress Binding with data provided.

Authentication: Bearer token

Request body

IngressBinding object to be created.

organization_id string Required

ID of the organization to which this ingress binding belongs.

slug string Required

Stable semantic key uniquely identifying this ingress binding (e.g. ingress.http.email_inbound, ingress.queue.support_tickets).

ingress_kind string Required

Type of ingress surface: "http", "webhook", "queue", "event-grid", "cron", "pubsub", "s3-event", etc.

description string

Optional human-readable description of the ingress behavior and purpose.

route string

Path, topic, subscription or expression for this binding. For webhook bindings created without a route, the service sets "/trigger/webhooks/{test|prod}/{slug or id}"; the public endpoint is POST /workflow-orchestration/trigger/webhooks/{mode}/{bindingIdentifier}. Examples: - "/trigger/webhooks/prod/ingress.http.inbound_email" - "queue:support_tickets" - "topic:user.events" - "cron:0 /5 * * * *"

target_trigger_id string

Identifier of the TriggerModel that should receive events from this ingress binding.

target_flow_version_id string

Optional direct reference to a FlowVersionModel if bypassing TriggerModel (advanced mode).

target_flow_definition_id string

Optional direct reference to a FlowDefinitionModel for webhook triggers bound to draft flows.

authentication object

Authentication and authorization requirements for this ingress endpoint.

mode string

"none", "api-key", "oauth2", "veripass-session", "service-token", "custom".

allowed_api_keys array<string>
oauth_scopes array<string>
veripass_policy string

Optional Veripass policy required to access this ingress endpoint (role, scope, context rules).

payload_mapping object

Rules for decoding and validating incoming payloads. Defines how external data translates into the internal EnvelopeModel payload.

content_type string

"json", "form-data", "text", "binary", "base64", or custom parser identifiers.

json_path string

Optional JSONPath-like selector for extracting a substructure of the payload.

raw_body boolean

When true, the raw HTTP body is preserved in the envelope.

schema object

Optional JSON-schema-like structure for validating incoming payloads.

correlation_strategy string

Strategy for deriving or generating correlation_id for the envelope: - "from-header" - "from-payload" - "auto-generate" - "custom-rule"

correlation_field string

Field name used when correlation_strategy references headers or payload (e.g. "x-correlation-id").

instance_creation object

Rules describing whether and how new FlowInstanceModel executions are created when events are received.

mode string

"always-new", "resume-existing", "merge", "conditional", "none".

resume_lookup_key string

Field (header or payload) used to find an existing flow instance in "resume-existing" mode.

rate_limit object

Optional ingress-level rate limiting to prevent excessive activation.

rpm integer
rps integer
is_system boolean

True if this binding is managed internally by the platform.

is_enabled boolean

True if this ingress binding is currently active.

target_node_id string

Node ID within the flow graph to which this binding is bound. Enables 1-binding-pair-per-node constraint.

mode string

Execution mode for this binding: "test" (executes draft via flow_definition_id) or "production" (executes published version via flow_version_id).

Allowed values testproduction
is_deprecated boolean

True if this binding should not be used for new integrations.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X POST https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "<organization_id>",
    "slug": "<slug>",
    "ingress_kind": "<ingress_kind>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234567890",
    "slug": "ingress.http.inbound_email",
    "ingress_kind": "http",
    "description": "HTTP webhook for receiving inbound email events from SendGrid.",
    "route": "/trigger/webhooks/prod/ingress.http.inbound_email",
    "target_trigger_id": "trig_email_webhook",
    "target_flow_version_id": null,
    "authentication": {
      "mode": "api-key",
      "allowed_api_keys": [
        "sendgrid-prod-key-1"
      ]
    },
    "payload_mapping": {
      "content_type": "json",
      "json_path": "$.event",
      "raw_body": false,
      "schema": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        }
      }
    },
    "correlation_strategy": "from-header",
    "correlation_field": "x-correlation-id",
    "instance_creation": {
      "mode": "always-new"
    },
    "rate_limit": {
      "rps": 50
    },
    "is_system": false
  }
}

Update an existing ingress binding.

PATCH /workflow-orchestration/triggers/ingress-binding/

Updates the data of an existing Ingress Binding with the data provided.

Authentication: Bearer token

Request body

IngressBinding object to be created.

organization_id string Required

ID of the organization to which this ingress binding belongs.

slug string Required

Stable semantic key uniquely identifying this ingress binding (e.g. ingress.http.email_inbound, ingress.queue.support_tickets).

ingress_kind string Required

Type of ingress surface: "http", "webhook", "queue", "event-grid", "cron", "pubsub", "s3-event", etc.

description string

Optional human-readable description of the ingress behavior and purpose.

route string

Path, topic, subscription or expression for this binding. For webhook bindings created without a route, the service sets "/trigger/webhooks/{test|prod}/{slug or id}"; the public endpoint is POST /workflow-orchestration/trigger/webhooks/{mode}/{bindingIdentifier}. Examples: - "/trigger/webhooks/prod/ingress.http.inbound_email" - "queue:support_tickets" - "topic:user.events" - "cron:0 /5 * * * *"

target_trigger_id string

Identifier of the TriggerModel that should receive events from this ingress binding.

target_flow_version_id string

Optional direct reference to a FlowVersionModel if bypassing TriggerModel (advanced mode).

target_flow_definition_id string

Optional direct reference to a FlowDefinitionModel for webhook triggers bound to draft flows.

authentication object

Authentication and authorization requirements for this ingress endpoint.

mode string

"none", "api-key", "oauth2", "veripass-session", "service-token", "custom".

allowed_api_keys array<string>
oauth_scopes array<string>
veripass_policy string

Optional Veripass policy required to access this ingress endpoint (role, scope, context rules).

payload_mapping object

Rules for decoding and validating incoming payloads. Defines how external data translates into the internal EnvelopeModel payload.

content_type string

"json", "form-data", "text", "binary", "base64", or custom parser identifiers.

json_path string

Optional JSONPath-like selector for extracting a substructure of the payload.

raw_body boolean

When true, the raw HTTP body is preserved in the envelope.

schema object

Optional JSON-schema-like structure for validating incoming payloads.

correlation_strategy string

Strategy for deriving or generating correlation_id for the envelope: - "from-header" - "from-payload" - "auto-generate" - "custom-rule"

correlation_field string

Field name used when correlation_strategy references headers or payload (e.g. "x-correlation-id").

instance_creation object

Rules describing whether and how new FlowInstanceModel executions are created when events are received.

mode string

"always-new", "resume-existing", "merge", "conditional", "none".

resume_lookup_key string

Field (header or payload) used to find an existing flow instance in "resume-existing" mode.

rate_limit object

Optional ingress-level rate limiting to prevent excessive activation.

rpm integer
rps integer
is_system boolean

True if this binding is managed internally by the platform.

is_enabled boolean

True if this ingress binding is currently active.

target_node_id string

Node ID within the flow graph to which this binding is bound. Enables 1-binding-pair-per-node constraint.

mode string

Execution mode for this binding: "test" (executes draft via flow_definition_id) or "production" (executes published version via flow_version_id).

Allowed values testproduction
is_deprecated boolean

True if this binding should not be used for new integrations.

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X PATCH https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "organization_id": "<organization_id>",
    "slug": "<slug>",
    "ingress_kind": "<ingress_kind>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234567890",
    "slug": "ingress.http.inbound_email",
    "ingress_kind": "http",
    "description": "HTTP webhook for receiving inbound email events from SendGrid.",
    "route": "/trigger/webhooks/prod/ingress.http.inbound_email",
    "target_trigger_id": "trig_email_webhook",
    "target_flow_version_id": null,
    "authentication": {
      "mode": "api-key",
      "allowed_api_keys": [
        "sendgrid-prod-key-1"
      ]
    },
    "payload_mapping": {
      "content_type": "json",
      "json_path": "$.event",
      "raw_body": false,
      "schema": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        }
      }
    },
    "correlation_strategy": "from-header",
    "correlation_field": "x-correlation-id",
    "instance_creation": {
      "mode": "always-new"
    },
    "rate_limit": {
      "rps": 50
    },
    "is_system": false
  }
}

Delete a Ingress Binding by its id.

DELETE /workflow-orchestration/triggers/ingress-binding/

Deletes a Ingress Binding based on the provided ID.

Authentication: Bearer token

Request body

ID of the Ingress Binding to delete

id string

Responses

  • 200 OK.
  • 500 Something went wrong while performing this action.
curl -X DELETE https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/ \
  -H "Authorization: Bearer $SOMMATIC_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "<id>"
  }'
Response
{
  "status": 200,
  "success": true,
  "message": "IngressBinding successfully deleted",
  "result": null
}

Get an Ingress Binding by query selector.

GET /workflow-orchestration/triggers/ingress-binding/{queryselector}

Returns the Ingress Binding information that matches the query selector an search specified in the route.

Authentication: Bearer token

Parameters

queryselector enum path Required

Is the filter available for this query

idorganization-idall

search string query

Keyword to search for entities.

include_status string query

Optional status parameter to include ingress bindings of a specific status.

exclude_status string query

Optional status parameter to exclude ingress bindings of a specific status.

page integer query

Page number, starting at 1 (default 1).

pageSize integer query

Records per page (default 25).

Responses

  • 200 OK.
  • 500 Something was wrong while you make this action.
curl -X GET https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/id \
  -H "Authorization: Bearer $SOMMATIC_TOKEN"
Response
{
  "status": 200,
  "success": true,
  "message": "Operation completed successfully",
  "result": {
    "organization_id": "org_1234567890",
    "slug": "ingress.http.inbound_email",
    "ingress_kind": "http",
    "description": "HTTP webhook for receiving inbound email events from SendGrid.",
    "route": "/trigger/webhooks/prod/ingress.http.inbound_email",
    "target_trigger_id": "trig_email_webhook",
    "target_flow_version_id": null,
    "authentication": {
      "mode": "api-key",
      "allowed_api_keys": [
        "sendgrid-prod-key-1"
      ]
    },
    "payload_mapping": {
      "content_type": "json",
      "json_path": "$.event",
      "raw_body": false,
      "schema": {
        "type": "object",
        "properties": {
          "subject": {
            "type": "string"
          },
          "body": {
            "type": "string"
          }
        }
      }
    },
    "correlation_strategy": "from-header",
    "correlation_field": "x-correlation-id",
    "instance_creation": {
      "mode": "always-new"
    },
    "rate_limit": {
      "rps": 50
    },
    "is_system": false
  }
}

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs