Skip to main content

FlowSynx Workflow Trigger API

The FlowSynx Workflow Trigger API provides endpoints for managing workflow triggers.
You can list, create, update, retrieve, and delete triggers for workflows via secured RESTful calls.
It uses RESTful principles and supports both Basic Authentication and Bearer Token Authentication.

Authentication & Authorization

Required:

  • Authentication: Yes (Bearer or Basic Auth)
  • Authorization: Yes (Must have admin or workflow role)

1. Basic Auth

curl -u username:password http://localhost:6262/workflows/{workflowId}/triggers

2. Bearer Token

curl -H "Authorization: Bearer <your_token>" http://localhost:6262/workflows/{workflowId}/triggers

Trigger Types & Status

WorkflowTriggerType

  • Manual: Triggered manually by a user or API call.
  • TimeBased: Triggered automatically based on a schedule or timer.

WorkflowTriggerStatus

  • Active: Trigger is enabled and can fire events.
  • DeActive: Trigger is disabled and will not fire until reactivated.

API Endpoints

List Workflow Triggers

  • Method: GET
  • Endpoint: /workflows/{workflowId}/triggers
  • Body Required: No
  • Description: Retrieves a list of all triggers for a given workflow.
info
  • workflowId: UUID of the workflow whose triggers are being retrieved.

curl Example

curl -X GET http://localhost:6262/workflows/83b102e0-9129-4069-abd5-97a312ed9c1f/triggers   -H "Authorization: Bearer <your_token>"

Example Response

{
"data": [
{
"id": "9eee96df-0250-44b7-8967-6e4c34454623",
"type": "TimeBased",
"status": "Active",
"properties": { "cron": "0 0 * * *" },
"lastModified": "2025-08-10T14:32:01Z"
}
],
"messages": [],
"succeeded": true,
"generatedAtUtc": "2025-08-10T14:32:01Z"
}

Get Workflow Trigger Details

  • Method: GET
  • Endpoint: /workflows/{workflowId}/triggers/{triggerId}
  • Body Required: No
  • Description: Retrieves details of a specific workflow trigger.
info
  • workflowId: UUID of the workflow.
  • triggerId: UUID of the trigger to retrieve.

curl Example

curl -X GET http://localhost:6262/workflows/83b102e0-9129-4069-abd5-97a312ed9c1f/triggers/9eee96df-0250-44b7-8967-6e4c34454623   -H "Authorization: Bearer <your_token>"

Example Response

{
"data": {
"id": "9eee96df-0250-44b7-8967-6e4c34454623",
"type": "TimeBased",
"status": "Active",
"properties": { "cron": "0 0 * * *" },
"lastModified": "2025-08-10T14:35:11Z"
},
"messages": [],
"succeeded": true,
"generatedAtUtc": "2025-08-10T14:35:11Z"
}

Add Workflow Trigger

  • Method: POST
  • Endpoint: /workflows/{workflowId}/triggers
  • Body Required: Yes
  • Description: Creates a new workflow trigger.

Request Body

{
"workflowId": "83b102e0-9129-4069-abd5-97a312ed9c1f",
"type": "TimeBased",
"status": "Active",
"properties": { "cron": "0 0 * * *" }
}

curl Example

curl -X POST http://localhost:6262/workflows/83b102e0-9129-4069-abd5-97a312ed9c1f/triggers   -H "Authorization: Bearer <your_token>"   -H "Content-Type: application/json"   -d '{
"workflowId": "83b102e0-9129-4069-abd5-97a312ed9c1f",
"type": "TimeBased",
"status": "Active",
"properties": { "cron": "0 0 * * *" }
}'

Example Response

{
"data": {
"triggerId": "5b464a7c-9e3c-4ea4-9a05-4fed563878b7"
},
"messages": [
"The workflow trigger has been added successfully."
],
"succeeded": true,
"generatedAtUtc": "2025-08-10T14:40:27Z"
}

Update Workflow Trigger

  • Method: PUT
  • Endpoint: /workflows/{workflowId}/triggers/{triggerId}
  • Body Required: Yes
  • Description: Updates the workflow trigger definition for the specified triggerId.
info
  • workflowId: UUID of the workflow.
  • triggerId: UUID of the trigger to update.

Request Body

{
"workflowId": "83b102e0-9129-4069-abd5-97a312ed9c1f",
"triggerId": "5b464a7c-9e3c-4ea4-9a05-4fed563878b7",
"type": "TimeBased",
"status": "Active",
"properties": { "cron": "0 6 * * *" }
}

curl Example

curl -X PUT http://localhost:6262/workflows/83b102e0-9129-4069-abd5-97a312ed9c1f/triggers/5b464a7c-9e3c-4ea4-9a05-4fed563878b7   -H "Authorization: Bearer <your_token>"   -H "Content-Type: application/json"   -d '{
"workflowId": "83b102e0-9129-4069-abd5-97a312ed9c1f",
"triggerId": "5b464a7c-9e3c-4ea4-9a05-4fed563878b7",
"type": "TimeBased",
"status": "Active",
"properties": { "cron": "0 6 * * *" }
}'

Example Response

{
"data": {},
"messages": [
"The workflow trigger has been updated successfully."
],
"succeeded": true,
"generatedAtUtc": "2025-08-10T14:45:50Z"
}

Delete Workflow Trigger

  • Method: DELETE
  • Endpoint: /workflows/{workflowId}/triggers/{triggerId}
  • Body Required: No
  • Description: Deletes the workflow trigger with the specified triggerId.
info
  • workflowId: UUID of the workflow.
  • triggerId: UUID of the trigger to delete.

curl Example

curl -X DELETE http://localhost:6262/workflows/83b102e0-9129-4069-abd5-97a312ed9c1f/triggers/9eee96df-0250-44b7-8967-6e4c34454623   -H "Authorization: Bearer <your_token>"

Example Response

{
"data": {},
"messages": [
"The workflow trigger has been deleted successfully."
],
"succeeded": true,
"generatedAtUtc": "2025-08-10T14:50:12Z"
}

Summary Table

OperationMethodEndpointBodyAuthenticationAuthorization roles
List Workflow TriggersGET/workflows/{workflowId}/triggersNo✅ Requiredadmin, workflow
Get Workflow TriggerGET/workflows/{workflowId}/triggers/{triggerId}No✅ Requiredadmin, workflow
Add Workflow TriggerPOST/workflows/{workflowId}/triggersYes✅ Requiredadmin, workflow
Update Workflow TriggerPUT/workflows/{workflowId}/triggers/{triggerId}Yes✅ Requiredadmin, workflow
Delete Workflow TriggerDELETE/workflows/{workflowId}/triggers/{triggerId}No✅ Requiredadmin, workflow
info
  • Use Bearer or Basic authentication depending on FlowSynx configuration.
  • Replace <your_token> or username:password with actual credentials.
  • The properties field is a key-value object and must be valid JSON.
  • All IDs (workflowId, triggerId) are UUIDs.