Asynchronous Execution
Starts an asynchronous execution of a published Chatbot (Chatflow or Workflow). This is ideal for long-running tasks. The API queues the job and immediately returns an execution_id
and tracking URLs, allowing you to check the status later without keeping the connection open.
The unique identifier of the Chatbot to execute.
The execution has been accepted for processing. The response body contains details to track the job.
API key is missing or invalid.
The requested resource was not found.
An unexpected error occurred on the server.
POST /v1/executions/{chatbot_id}/async HTTP/1.1
Host: api.waterflai.ai
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 66
{
"input_data": {
"query": "What is Waterflai?",
"user_id": "user-123"
}
}
{
"execution_id": "text",
"status_url": "https://example.com",
"stream_url": "https://example.com",
"cancel_url": "https://example.com"
}
Retrieves the current status and result of a specific asynchronous execution. You should poll this endpoint to check the job's progress. Once the status
is COMPLETED
, the final_output
field will contain the result.
The unique identifier of the execution job.
The current state of the execution job.
API key is missing or invalid.
The requested resource was not found.
An unexpected error occurred on the server.
GET /v1/executions/{execution_id} HTTP/1.1
Host: api.waterflai.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
"execution_id": "text",
"status": "PENDING",
"progress": 1,
"current_node": "text",
"completed_nodes": 1,
"total_nodes": 1,
"final_output": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"error_message": "text",
"created_at": "2025-09-14T04:33:48.102Z",
"started_at": "2025-09-14T04:33:48.102Z",
"completed_at": "2025-09-14T04:33:48.102Z",
"retry_count": 1,
"execution_source": "CHATBOT",
"is_temporary": true,
"cleanup_after": "2025-09-14T04:33:48.102Z"
}
Cancels a PENDING
or RUNNING
execution. Completed, failed, or already cancelled jobs cannot be cancelled again.
The unique identifier of the execution job to cancel.
The cancellation request was successfully processed.
API key is missing or invalid.
The requested resource was not found.
An unexpected error occurred on the server.
DELETE /v1/executions/{execution_id} HTTP/1.1
Host: api.waterflai.ai
X-API-Key: YOUR_API_KEY
Accept: */*
{
"execution_id": "text",
"cancelled": true,
"message": "text",
"previous_status": "PENDING"
}
Streams the real-time progress of a specific asynchronous execution via Server-Sent Events (SSE). This provides a live feed of events like node_started
, node_completed
, and execution_completed
. The stream closes automatically when the job finishes.
The unique identifier of the execution job.
A stream of events representing the real-time execution progress.
data: {"type": "progress_update", "progress": 50.0}
API key is missing or invalid.
The requested resource was not found.
An unexpected error occurred on the server.
GET /v1/executions/{execution_id}/stream HTTP/1.1
Host: api.waterflai.ai
X-API-Key: YOUR_API_KEY
Accept: */*
data: {"type": "progress_update", "progress": 50.0}