Workflows
Retrieve workflow execution
Get complete details for a workflow execution including current status, execution context, variables, and full event history.
This is the only endpoint that returns the full execution_context (vars, system, context, metadata) along with the complete event history.
Use this endpoint to:
- Monitor execution progress and current step
- Debug failed executions with full event log
- Review execution variables and context
- Check error details when status is ‘failed’
The response includes:
- Current status and step
- Complete event chronology (step transitions, agent actions, variable updates)
- Full execution_context with standard structure (vars, system, context, metadata)
- Error details if execution failed
GET
/
workflow_executions
/
{execution_id}
Retrieve workflow execution
curl --request GET \
--url https://api.kapso.ai/platform/v1/workflow_executions/{execution_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "running",
"started_at": "2023-11-07T05:31:56Z",
"last_event_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"tracking_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>"
},
"current_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"stepable_type": "<string>",
"position": {
"x": 123,
"y": 123
}
},
"error_details": {},
"execution_context": {
"vars": {
"lead_id": 123,
"last_user_input": {
"button_id": "yes"
}
},
"system": {
"trigger_type": "api_call",
"tracking_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"context": {
"channel": "api",
"phone_number": "+15551234567"
},
"metadata": {
"request": {
"ip": "<string>",
"user_agent": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}
},
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"direction": "<string>",
"edge_label": "<string>",
"payload": {},
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"stepable_type": "<string>",
"position": {
"x": 123,
"y": 123
}
}
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Path Parameters
Execution identifier
Response
Execution details retrieved successfully
Single workflow execution with full details
Detailed execution with full context and event history (only returned by show endpoint)
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Retrieve workflow execution
curl --request GET \
--url https://api.kapso.ai/platform/v1/workflow_executions/{execution_id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kapso.ai/platform/v1/workflow_executions/{execution_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "running",
"started_at": "2023-11-07T05:31:56Z",
"last_event_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"tracking_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"whatsapp_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflow": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "<string>"
},
"current_step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"stepable_type": "<string>",
"position": {
"x": 123,
"y": 123
}
},
"error_details": {},
"execution_context": {
"vars": {
"lead_id": 123,
"last_user_input": {
"button_id": "yes"
}
},
"system": {
"trigger_type": "api_call",
"tracking_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"context": {
"channel": "api",
"phone_number": "+15551234567"
},
"metadata": {
"request": {
"ip": "<string>",
"user_agent": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
}
},
"events": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"event_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"direction": "<string>",
"edge_label": "<string>",
"payload": {},
"step": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"identifier": "<string>",
"stepable_type": "<string>",
"position": {
"x": 123,
"y": 123
}
}
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}
