Run AI Flow (Synchronous)
Execute an AI Flow and wait for the final execution result.
Execute an AI Flow synchronously.
Unlike the asynchronous endpoint, this endpoint waits until the Flow finishes executing before returning a response.
By default, the server waits for 60 seconds. You can override this using the optional timeout query parameter.
*Required field
Headers
| Header | Type | Description |
|---|---|---|
Authorization | string | Bearer token in the format Bearer <your_api_token>. Required if the token is not provided as a query parameter. |
Parameters
| Parameter | Type | Description |
|---|---|---|
workspace_uuid* | string | Unique identifier of the workspace. |
flow_uuid* | string | Unique identifier of the AI Flow. |
timeout | integer | Maximum time to wait for completion in seconds. Defaults to 60 seconds. |
token | string | API token supplied as a query parameter instead of the Authorization header. |
Request Body
| Field | Type | Description |
|---|---|---|
host | string | Value for the 'host' placeholder. |
service | string | Value for the 'service' placeholder. |
Response Status Codes
200Flow completed successfully.
408Execution timed out.
401Unauthorized. Invalid or missing API token.
curl -X POST \
"https://{your_domain}/api/v1/workspaces/{workspace_uuid}/prompts/{flow_uuid}/run/sync?timeout=120" \
-H "Authorization: Bearer <your_api_token>" \
-H "Content-Type: application/json" \
-d '{
"host": "example.com",
"service": "Customer Support"
}'
Response 200JSON
{
"meta": {
"status": "SUCCESS"
},
"result": {
"output": {
"response": "Flow execution completed successfully."
}
}
}