App triggers
Update an app trigger
Replace its tables (each with its record changes and filters), or switch it on or pause it. The target and the connection stay. Only the fields sent change.
Authorization
AuthorizationstringheaderrequiredBearer <key>, where <key> is a workspace API key or a user API key. See Authentication.
workspace_id*integerThe workspace. List the ones your key can reach with GET /v1/workspaces.
app_trigger_id*stringThe app trigger.
uuidregion*RegionsRegion of the resource: besg (Europe) or usnv (United States), as GET /v1/regions lists them
"besg""usnv"application/json- body
tables?array<>|Replaces every table
nullstatus?|on runs the target on changes, paused stops it
nullvalidate_only?Validate OnlyRun every check of the write and answer 204 without writing: a refused write answers the error the write would
falseOK
application/json- response
app_trigger_id*App Trigger Idtarget*What runs on each change
connection_id*Connection IdThe connection whose app is watched
tables*array<>One entry per trigger: the table, its record changes, filters
status*AppTriggerStatus"on""paused"region*Regions"besg""usnv"curl -X PATCH 'https://api.stacksync.com/v1/workspaces/0/app-triggers/497f6eca-6276-4993-bfeb-53cbbbba6f08?region=besg' \ -H 'Content-Type: application/json' \ -d '{ "status": "on"}'{ "app_trigger_id": "<app_trigger_id>", "target": { "type": "workflow", "id": "<id>", "step_id": "<step_id>", "interface_id": "<interface_id>" }, "connection_id": "<connection_id>", "tables": [ { "table_name": "<table_name>", "operations": [ "created" ], "filters": { "type": "group", "operator": "and" } } ], "status": "on", "region": "besg"}POSTCreate an app trigger
Watch tables of a connection and run a workflow's sync trigger step or a genie's Trigger interface on each matching change, from now on (past records are not replayed). The trigger is switched on and saved on the workflow's draft step or the genie's interface; a draft saved meanwhile is refused with 409 and nothing is created. Send an Idempotency-Key to retry safely.
DELDelete an app trigger
Removes the trigger from where it is attached, in one call: the workflow's trigger step with its edges (a deployed latest version needs a new draft first, 409), or the genie's Trigger interface, and the watch of the app.