Test run a workflow
curl --request POST \
--url https://posttu.com/api/v1/workflow/{id}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflowId": "wkf_123abc",
"triggerPayload": {
"userId": "usr_123"
}
}
'import requests
url = "https://posttu.com/api/v1/workflow/{id}/test"
payload = {
"workflowId": "wkf_123abc",
"triggerPayload": { "userId": "usr_123" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({workflowId: 'wkf_123abc', triggerPayload: {userId: 'usr_123'}})
};
fetch('https://posttu.com/api/v1/workflow/{id}/test', 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://posttu.com/api/v1/workflow/{id}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflowId' => 'wkf_123abc',
'triggerPayload' => [
'userId' => 'usr_123'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://posttu.com/api/v1/workflow/{id}/test"
payload := strings.NewReader("{\n \"workflowId\": \"wkf_123abc\",\n \"triggerPayload\": {\n \"userId\": \"usr_123\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://posttu.com/api/v1/workflow/{id}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"wkf_123abc\",\n \"triggerPayload\": {\n \"userId\": \"usr_123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://posttu.com/api/v1/workflow/{id}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowId\": \"wkf_123abc\",\n \"triggerPayload\": {\n \"userId\": \"usr_123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"runId": "test_run_123",
"workflowId": "<string>",
"status": "COMPLETED",
"output": {},
"logs": [
{
"id": "<string>",
"stepId": "<string>",
"stepName": "<string>",
"status": "COMPLETED",
"timestamp": "2023-11-07T05:31:56Z",
"message": "<string>",
"output": "<unknown>",
"error": "<string>"
}
],
"duration": 1500
}{
"error": "<string>"
}Runs and testing
Test workflow draft
Execute a test run of a workflow draft using sample or custom trigger payloads.
POST
/
api
/
v1
/
workflow
/
{id}
/
test
Test run a workflow
curl --request POST \
--url https://posttu.com/api/v1/workflow/{id}/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflowId": "wkf_123abc",
"triggerPayload": {
"userId": "usr_123"
}
}
'import requests
url = "https://posttu.com/api/v1/workflow/{id}/test"
payload = {
"workflowId": "wkf_123abc",
"triggerPayload": { "userId": "usr_123" }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({workflowId: 'wkf_123abc', triggerPayload: {userId: 'usr_123'}})
};
fetch('https://posttu.com/api/v1/workflow/{id}/test', 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://posttu.com/api/v1/workflow/{id}/test",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflowId' => 'wkf_123abc',
'triggerPayload' => [
'userId' => 'usr_123'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://posttu.com/api/v1/workflow/{id}/test"
payload := strings.NewReader("{\n \"workflowId\": \"wkf_123abc\",\n \"triggerPayload\": {\n \"userId\": \"usr_123\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://posttu.com/api/v1/workflow/{id}/test")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"wkf_123abc\",\n \"triggerPayload\": {\n \"userId\": \"usr_123\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://posttu.com/api/v1/workflow/{id}/test")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowId\": \"wkf_123abc\",\n \"triggerPayload\": {\n \"userId\": \"usr_123\"\n }\n}"
response = http.request(request)
puts response.read_body{
"runId": "test_run_123",
"workflowId": "<string>",
"status": "COMPLETED",
"output": {},
"logs": [
{
"id": "<string>",
"stepId": "<string>",
"stepName": "<string>",
"status": "COMPLETED",
"timestamp": "2023-11-07T05:31:56Z",
"message": "<string>",
"output": "<unknown>",
"error": "<string>"
}
],
"duration": 1500
}{
"error": "<string>"
}Executes an isolated test run of a workflow draft without activating production trigger listeners. Steps execute for real, providing exact execution logs and output data for debugging.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier of the workflow (wkf_...). |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
triggerPayload | object | No | Optional JSON object containing mock trigger data to evaluate expressions against. |
cURL Example
curl -X POST "https://posttu.com/api/v1/workflow/wkf_abc123/test" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"triggerPayload": {
"item": {
"title": "Breaking Tech News",
"description": "Artificial intelligence breakthrough announced today.",
"link": "https://example.com/article-1"
}
}
}'
Response Example
{
"data": {
"runId": "run_test_999",
"status": "SUCCESS",
"mode": "test",
"startedAt": "2026-07-29T22:20:00.000Z",
"finishedAt": "2026-07-29T22:20:01.250Z",
"durationMs": 1250
},
"success": true
}
Authorizations
Body
application/json
Response
Test run result
Last modified on July 30, 2026

