Workflow Execution

The /workflows/execute endpoint allows you to execute workflows directly by name.

Execute Workflow

Endpoint: /workflows/execute/<WORKFLOW_NAME>

Method: POST

Headers

HeaderValue
AuthorizationBearer <YOUR_JWT_TOKEN>
Content-Typeapplication/json

Path Parameters

ParameterDescription
<WORKFLOW_NAME>The name of the workflow to execute.

Input Parameters

ParameterData TypeDescription
varsRecord<string, any>(Optional) Parameters to pass to the workflow.
uniqueboolean(Optional) Make the workflow ID unique by adding a random token. Default: false.
custom_idstring(Optional) Custom ID to use for the workflow execution instead of the generated one.
task_queuestring(Optional) Task queue to assign the workflow to (used with custom workflow workers)
objectIdsstring[](Optional) Document IDs.

Example Request

{
  "vars": {
    "input_text": "Hello world",
    "target_language": "es"
  },
  "unique": true,
  "custom_id": "my-custom-execution-123"
}

Example Response

{
  "runId": "<WORKFLOW_RUN_ID>",
  "workflowId": "<WORKFLOW_ID>"
}

Code Examples

Execute Workflow

curl --location 'https://api.vertesia.io/api/v1/workflows/execute/<WORKFLOW_NAME>' \
--header 'Authorization: Bearer <YOUR_JWT_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "vars": {
    "input_text": "Hello world",
    "target_language": "es"
  },
  "unique": true,
  "custom_id": "my-custom-execution-123",
}'

Was this page helpful?