Run AI Flow (Synchronous)

Execute an AI Flow and wait for the final execution result.

POST/api/v1/workspaces/{workspace_uuid}/prompts/{flow_uuid}/run/sync

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

HeaderTypeDescription
AuthorizationstringBearer token in the format Bearer <your_api_token>. Required if the token is not provided as a query parameter.

Parameters

ParameterTypeDescription
workspace_uuid*stringUnique identifier of the workspace.
flow_uuid*stringUnique identifier of the AI Flow.
timeoutintegerMaximum time to wait for completion in seconds. Defaults to 60 seconds.
tokenstringAPI token supplied as a query parameter instead of the Authorization header.

Request Body

FieldTypeDescription
hoststringValue for the 'host' placeholder.
servicestringValue 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."
    }
  }
}