Triggers Beta
Start workflows from webhooks and other workflows, and manage ingress bindings.
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
-
modestring 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_idstring Required -
The organization scope for the target workflow.
-
target_flow_slugstring -
The slug of the target workflow to invoke.
-
target_flow_definition_idstring -
Explicit flow definition ID. Takes precedence over slug.
-
execution_modestring -
Sync waits for completion. Async returns immediately.
Allowed valuessyncasync -
dataobject -
Input data to pass to the target workflow.
-
chain_contextobject -
Traceability metadata from the calling workflow.
-
caller_flow_instance_idstring -
caller_flow_slugstring -
caller_node_idstring -
correlation_idstring
-
Responses
-
200Workflow executed successfully (sync mode). -
202Workflow dispatched (async mode). -
404Target workflow not found. -
500Internal 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>"
}'const response = await fetch('https://api.sommatic.ai/workflow-orchestration/trigger/chain/test', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"organization_id": "<organization_id>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/workflow-orchestration/trigger/chain/test",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"organization_id": "<organization_id>"
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "Operation completed successfully",
"result": {}
}{
"status": 202,
"success": true,
"message": "Operation completed successfully",
"result": {}
}{
"status": 404,
"success": false,
"message": "Something was wrong while you make this action",
"result": {}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": {}
}dispatchChainStream (/workflow-orchestration/trigger/chain/:mode/stream)
POST /workflow-orchestration/trigger/chain/{mode}/stream
Authentication: Bearer token
Parameters
-
modestring path Required
Responses
curl -X POST https://api.sommatic.ai/workflow-orchestration/trigger/chain/<mode>/stream \
-H "Authorization: Bearer $SOMMATIC_TOKEN" \
-Nconst response = await fetch('https://api.sommatic.ai/workflow-orchestration/trigger/chain/<mode>/stream', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/workflow-orchestration/trigger/chain/<mode>/stream",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json()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
-
modestring path Required -
`test` runs the draft; `prod` runs the latest published version.
testprod -
bindingIdentifierstring path Required -
`IngressBinding` id (preferred) or its custom slug.
-
execution_modestring 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
-
202Accepted. 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. -
400Missing 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. -
413Request body exceeded the per-route limit (5 MB). -
500Orchestrator 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 '{}'const response = await fetch('https://api.sommatic.ai/workflow-orchestration/trigger/webhooks/test/<bindingIdentifier>', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/workflow-orchestration/trigger/webhooks/test/<bindingIdentifier>",
json={},
)
data = response.json(){
"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
}
]
}
}{
"status": 202,
"success": true,
"message": "Operation completed successfully",
"result": {
"instance": {
"id": "wf-flow-instance-xxx",
"status": "running"
},
"execution_mode": "async"
}
}{
"status": 400,
"success": false,
"message": "Something was wrong while you make this action",
"result": {}
}{
"status": 404,
"success": false,
"message": "Something was wrong while you make this action",
"result": {}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": {}
}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_idstring Required -
ID of the organization to which this ingress binding belongs.
-
slugstring Required -
Stable semantic key uniquely identifying this ingress binding (e.g. ingress.http.email_inbound, ingress.queue.support_tickets).
-
ingress_kindstring Required -
Type of ingress surface: "http", "webhook", "queue", "event-grid", "cron", "pubsub", "s3-event", etc.
-
descriptionstring -
Optional human-readable description of the ingress behavior and purpose.
-
routestring -
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_idstring -
Identifier of the TriggerModel that should receive events from this ingress binding.
-
target_flow_version_idstring -
Optional direct reference to a FlowVersionModel if bypassing TriggerModel (advanced mode).
-
target_flow_definition_idstring -
Optional direct reference to a FlowDefinitionModel for webhook triggers bound to draft flows.
-
authenticationobject -
Authentication and authorization requirements for this ingress endpoint.
-
modestring -
"none", "api-key", "oauth2", "veripass-session", "service-token", "custom".
-
allowed_api_keysarray<string> -
oauth_scopesarray<string> -
veripass_policystring -
Optional Veripass policy required to access this ingress endpoint (role, scope, context rules).
-
-
payload_mappingobject -
Rules for decoding and validating incoming payloads. Defines how external data translates into the internal EnvelopeModel payload.
-
content_typestring -
"json", "form-data", "text", "binary", "base64", or custom parser identifiers.
-
json_pathstring -
Optional JSONPath-like selector for extracting a substructure of the payload.
-
raw_bodyboolean -
When true, the raw HTTP body is preserved in the envelope.
-
schemaobject -
Optional JSON-schema-like structure for validating incoming payloads.
-
-
correlation_strategystring -
Strategy for deriving or generating correlation_id for the envelope: - "from-header" - "from-payload" - "auto-generate" - "custom-rule"
-
correlation_fieldstring -
Field name used when correlation_strategy references headers or payload (e.g. "x-correlation-id").
-
instance_creationobject -
Rules describing whether and how new FlowInstanceModel executions are created when events are received.
-
modestring -
"always-new", "resume-existing", "merge", "conditional", "none".
-
resume_lookup_keystring -
Field (header or payload) used to find an existing flow instance in "resume-existing" mode.
-
-
rate_limitobject -
Optional ingress-level rate limiting to prevent excessive activation.
-
rpminteger -
rpsinteger
-
-
is_systemboolean -
True if this binding is managed internally by the platform.
-
is_enabledboolean -
True if this ingress binding is currently active.
-
target_node_idstring -
Node ID within the flow graph to which this binding is bound. Enables 1-binding-pair-per-node constraint.
-
modestring -
Execution mode for this binding: "test" (executes draft via flow_definition_id) or "production" (executes published version via flow_version_id).
Allowed valuestestproduction -
is_deprecatedboolean -
True if this binding should not be used for new integrations.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"organization_id": "<organization_id>",
"slug": "<slug>",
"ingress_kind": "<ingress_kind>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.post(
"https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"organization_id": "<organization_id>",
"slug": "<slug>",
"ingress_kind": "<ingress_kind>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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_idstring Required -
ID of the organization to which this ingress binding belongs.
-
slugstring Required -
Stable semantic key uniquely identifying this ingress binding (e.g. ingress.http.email_inbound, ingress.queue.support_tickets).
-
ingress_kindstring Required -
Type of ingress surface: "http", "webhook", "queue", "event-grid", "cron", "pubsub", "s3-event", etc.
-
descriptionstring -
Optional human-readable description of the ingress behavior and purpose.
-
routestring -
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_idstring -
Identifier of the TriggerModel that should receive events from this ingress binding.
-
target_flow_version_idstring -
Optional direct reference to a FlowVersionModel if bypassing TriggerModel (advanced mode).
-
target_flow_definition_idstring -
Optional direct reference to a FlowDefinitionModel for webhook triggers bound to draft flows.
-
authenticationobject -
Authentication and authorization requirements for this ingress endpoint.
-
modestring -
"none", "api-key", "oauth2", "veripass-session", "service-token", "custom".
-
allowed_api_keysarray<string> -
oauth_scopesarray<string> -
veripass_policystring -
Optional Veripass policy required to access this ingress endpoint (role, scope, context rules).
-
-
payload_mappingobject -
Rules for decoding and validating incoming payloads. Defines how external data translates into the internal EnvelopeModel payload.
-
content_typestring -
"json", "form-data", "text", "binary", "base64", or custom parser identifiers.
-
json_pathstring -
Optional JSONPath-like selector for extracting a substructure of the payload.
-
raw_bodyboolean -
When true, the raw HTTP body is preserved in the envelope.
-
schemaobject -
Optional JSON-schema-like structure for validating incoming payloads.
-
-
correlation_strategystring -
Strategy for deriving or generating correlation_id for the envelope: - "from-header" - "from-payload" - "auto-generate" - "custom-rule"
-
correlation_fieldstring -
Field name used when correlation_strategy references headers or payload (e.g. "x-correlation-id").
-
instance_creationobject -
Rules describing whether and how new FlowInstanceModel executions are created when events are received.
-
modestring -
"always-new", "resume-existing", "merge", "conditional", "none".
-
resume_lookup_keystring -
Field (header or payload) used to find an existing flow instance in "resume-existing" mode.
-
-
rate_limitobject -
Optional ingress-level rate limiting to prevent excessive activation.
-
rpminteger -
rpsinteger
-
-
is_systemboolean -
True if this binding is managed internally by the platform.
-
is_enabledboolean -
True if this ingress binding is currently active.
-
target_node_idstring -
Node ID within the flow graph to which this binding is bound. Enables 1-binding-pair-per-node constraint.
-
modestring -
Execution mode for this binding: "test" (executes draft via flow_definition_id) or "production" (executes published version via flow_version_id).
Allowed valuestestproduction -
is_deprecatedboolean -
True if this binding should not be used for new integrations.
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"organization_id": "<organization_id>",
"slug": "<slug>",
"ingress_kind": "<ingress_kind>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.patch(
"https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"organization_id": "<organization_id>",
"slug": "<slug>",
"ingress_kind": "<ingress_kind>"
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}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
-
idstring
Responses
-
200OK. -
500Something 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>"
}'const response = await fetch('https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"id": "<id>"
}),
});
const { success, message, result } = await response.json();import os
import requests
response = requests.delete(
"https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
json={
"id": "<id>"
},
)
data = response.json(){
"status": 200,
"success": true,
"message": "IngressBinding successfully deleted",
"result": null
}{
"status": 500,
"success": false,
"message": "Something went wrong while performing this action",
"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
-
queryselectorenum path Required -
Is the filter available for this query
idorganization-idall -
searchstring query -
Keyword to search for entities.
-
include_statusstring query -
Optional status parameter to include ingress bindings of a specific status.
-
exclude_statusstring query -
Optional status parameter to exclude ingress bindings of a specific status.
-
pageinteger query -
Page number, starting at 1 (default 1).
-
pageSizeinteger query -
Records per page (default 25).
Responses
-
200OK. -
500Something 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"const response = await fetch('https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/id', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.SOMMATIC_TOKEN}`,
},
});
const { success, message, result } = await response.json();import os
import requests
response = requests.get(
"https://api.sommatic.ai/workflow-orchestration/triggers/ingress-binding/id",
headers={
"Authorization": f"Bearer {os.environ['SOMMATIC_TOKEN']}",
},
)
data = response.json(){
"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
}
}{
"status": 500,
"success": false,
"message": "Something was wrong while you make this action",
"result": null
}