Asynchronous Execution

Start Asynchronous Execution

post

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.

Authorizations
X-API-KeystringRequired

Your secret API key.

Path parameters
chatbot_idstringRequired

The unique identifier of the Chatbot to execute.

Body
Responses
chevron-right
202

The execution has been accepted for processing. The response body contains details to track the job.

application/json
execution_idstringOptional

The unique identifier for this execution job.

status_urlstring · uriOptional

The URL to poll for the execution status.

stream_urlstring · uriOptional

The URL to stream real-time progress.

cancel_urlstring · uriOptional

The URL to cancel the execution.

post
/v1/executions/{chatbot_id}/async

Get Execution Status

get

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.

Authorizations
X-API-KeystringRequired

Your secret API key.

Path parameters
execution_idstringRequired

The unique identifier of the execution job.

Responses
get
/v1/executions/{execution_id}

Cancel Asynchronous Execution

delete

Cancels a PENDING or RUNNING execution. Completed, failed, or already cancelled jobs cannot be cancelled again.

Authorizations
X-API-KeystringRequired

Your secret API key.

Path parameters
execution_idstringRequired

The unique identifier of the execution job to cancel.

Responses
delete
/v1/executions/{execution_id}

Stream Asynchronous Execution Progress

get

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.

Authorizations
X-API-KeystringRequired

Your secret API key.

Path parameters
execution_idstringRequired

The unique identifier of the execution job.

Responses
get
/v1/executions/{execution_id}/stream

Last updated