Workflow Execution
The /workflows/execute
endpoint allows you to execute workflows directly by name.
Execute Workflow
Endpoint: /workflows/execute/<WORKFLOW_NAME>
Method: POST
Headers
Header | Value |
---|---|
Authorization | Bearer <YOUR_JWT_TOKEN> |
Content-Type | application/json |
Path Parameters
Parameter | Description |
---|---|
<WORKFLOW_NAME> | The name of the workflow to execute. |
Input Parameters
Parameter | Data Type | Description |
---|---|---|
vars | Record<string, any> | (Optional) Parameters to pass to the workflow. |
unique | boolean | (Optional) Make the workflow ID unique by adding a random token. Default: false. |
custom_id | string | (Optional) Custom ID to use for the workflow execution instead of the generated one. |
task_queue | string | (Optional) Task queue to assign the workflow to (used with custom workflow workers) |
objectIds | string[] | (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",
}'