Upsert a workflow step
curl --request POST \
--url https://posttu.com/api/v1/workflow/{id}/step \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflowId": "wkf_123abc",
"name": "sendNotification",
"displayName": "Send Notification",
"stepId": "step_456xyz",
"settings": {},
"parentStepId": "<string>",
"branchId": "branch_1",
"afterStepId": "step_123",
"previousStepId": "step_123",
"canvasPosition": {
"x": 100,
"y": 200
}
}
'import requests
url = "https://posttu.com/api/v1/workflow/{id}/step"
payload = {
"workflowId": "wkf_123abc",
"name": "sendNotification",
"displayName": "Send Notification",
"stepId": "step_456xyz",
"settings": {},
"parentStepId": "<string>",
"branchId": "branch_1",
"afterStepId": "step_123",
"previousStepId": "step_123",
"canvasPosition": {
"x": 100,
"y": 200
}
}
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',
name: 'sendNotification',
displayName: 'Send Notification',
stepId: 'step_456xyz',
settings: {},
parentStepId: '<string>',
branchId: 'branch_1',
afterStepId: 'step_123',
previousStepId: 'step_123',
canvasPosition: {x: 100, y: 200}
})
};
fetch('https://posttu.com/api/v1/workflow/{id}/step', 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}/step",
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',
'name' => 'sendNotification',
'displayName' => 'Send Notification',
'stepId' => 'step_456xyz',
'settings' => [
],
'parentStepId' => '<string>',
'branchId' => 'branch_1',
'afterStepId' => 'step_123',
'previousStepId' => 'step_123',
'canvasPosition' => [
'x' => 100,
'y' => 200
]
]),
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}/step"
payload := strings.NewReader("{\n \"workflowId\": \"wkf_123abc\",\n \"name\": \"sendNotification\",\n \"displayName\": \"Send Notification\",\n \"stepId\": \"step_456xyz\",\n \"settings\": {},\n \"parentStepId\": \"<string>\",\n \"branchId\": \"branch_1\",\n \"afterStepId\": \"step_123\",\n \"previousStepId\": \"step_123\",\n \"canvasPosition\": {\n \"x\": 100,\n \"y\": 200\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}/step")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"wkf_123abc\",\n \"name\": \"sendNotification\",\n \"displayName\": \"Send Notification\",\n \"stepId\": \"step_456xyz\",\n \"settings\": {},\n \"parentStepId\": \"<string>\",\n \"branchId\": \"branch_1\",\n \"afterStepId\": \"step_123\",\n \"previousStepId\": \"step_123\",\n \"canvasPosition\": {\n \"x\": 100,\n \"y\": 200\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://posttu.com/api/v1/workflow/{id}/step")
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 \"name\": \"sendNotification\",\n \"displayName\": \"Send Notification\",\n \"stepId\": \"step_456xyz\",\n \"settings\": {},\n \"parentStepId\": \"<string>\",\n \"branchId\": \"branch_1\",\n \"afterStepId\": \"step_123\",\n \"previousStepId\": \"step_123\",\n \"canvasPosition\": {\n \"x\": 100,\n \"y\": 200\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "step_xyz789",
"name": "sendMessage",
"displayName": "Send Message",
"settings": {},
"isSkipped": false,
"workflowId": "<string>",
"parentStepId": "<string>",
"branchId": "<string>",
"previousStepId": "<string>",
"canvasPosition": {
"x": 100,
"y": 200
}
}{
"error": "<string>"
}Steps
Upsert workflow step
Add a new action step or update an existing step in a workflow draft.
POST
/
api
/
v1
/
workflow
/
{id}
/
step
Upsert a workflow step
curl --request POST \
--url https://posttu.com/api/v1/workflow/{id}/step \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflowId": "wkf_123abc",
"name": "sendNotification",
"displayName": "Send Notification",
"stepId": "step_456xyz",
"settings": {},
"parentStepId": "<string>",
"branchId": "branch_1",
"afterStepId": "step_123",
"previousStepId": "step_123",
"canvasPosition": {
"x": 100,
"y": 200
}
}
'import requests
url = "https://posttu.com/api/v1/workflow/{id}/step"
payload = {
"workflowId": "wkf_123abc",
"name": "sendNotification",
"displayName": "Send Notification",
"stepId": "step_456xyz",
"settings": {},
"parentStepId": "<string>",
"branchId": "branch_1",
"afterStepId": "step_123",
"previousStepId": "step_123",
"canvasPosition": {
"x": 100,
"y": 200
}
}
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',
name: 'sendNotification',
displayName: 'Send Notification',
stepId: 'step_456xyz',
settings: {},
parentStepId: '<string>',
branchId: 'branch_1',
afterStepId: 'step_123',
previousStepId: 'step_123',
canvasPosition: {x: 100, y: 200}
})
};
fetch('https://posttu.com/api/v1/workflow/{id}/step', 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}/step",
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',
'name' => 'sendNotification',
'displayName' => 'Send Notification',
'stepId' => 'step_456xyz',
'settings' => [
],
'parentStepId' => '<string>',
'branchId' => 'branch_1',
'afterStepId' => 'step_123',
'previousStepId' => 'step_123',
'canvasPosition' => [
'x' => 100,
'y' => 200
]
]),
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}/step"
payload := strings.NewReader("{\n \"workflowId\": \"wkf_123abc\",\n \"name\": \"sendNotification\",\n \"displayName\": \"Send Notification\",\n \"stepId\": \"step_456xyz\",\n \"settings\": {},\n \"parentStepId\": \"<string>\",\n \"branchId\": \"branch_1\",\n \"afterStepId\": \"step_123\",\n \"previousStepId\": \"step_123\",\n \"canvasPosition\": {\n \"x\": 100,\n \"y\": 200\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}/step")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"wkf_123abc\",\n \"name\": \"sendNotification\",\n \"displayName\": \"Send Notification\",\n \"stepId\": \"step_456xyz\",\n \"settings\": {},\n \"parentStepId\": \"<string>\",\n \"branchId\": \"branch_1\",\n \"afterStepId\": \"step_123\",\n \"previousStepId\": \"step_123\",\n \"canvasPosition\": {\n \"x\": 100,\n \"y\": 200\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://posttu.com/api/v1/workflow/{id}/step")
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 \"name\": \"sendNotification\",\n \"displayName\": \"Send Notification\",\n \"stepId\": \"step_456xyz\",\n \"settings\": {},\n \"parentStepId\": \"<string>\",\n \"branchId\": \"branch_1\",\n \"afterStepId\": \"step_123\",\n \"previousStepId\": \"step_123\",\n \"canvasPosition\": {\n \"x\": 100,\n \"y\": 200\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "step_xyz789",
"name": "sendMessage",
"displayName": "Send Message",
"settings": {},
"isSkipped": false,
"workflowId": "<string>",
"parentStepId": "<string>",
"branchId": "<string>",
"previousStepId": "<string>",
"canvasPosition": {
"x": 100,
"y": 200
}
}{
"error": "<string>"
}Adds a new step node or updates an existing step node within a workflow draft canvas. Settings fields can use Mustache dynamic expressions (e.g.
{{trigger.body.text}}, {{steps.step_1.data}}) to reference outputs from previous nodes.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Unique identifier of the workflow (wkf_...). |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Action piece type (e.g. ai_ask_ai, x_create_post, http_request, condition, loop, delay, code). |
displayName | string | Yes | Human-readable label displayed on canvas node. |
stepId | string | No | Target step ID to update. Omit to add a new step node. |
settings | object | No | Action configuration properties and {{...}} expressions. |
parentStepId | string | No | ID of parent container step (e.g. condition or loop). |
branchId | string | No | Target branch ID if placing step inside a conditional router branch (e.g. branch_1, otherwise). |
afterStepId | string | No | ID of preceding step in the linked list graph sequence to insert after. Downstream steps are automatically relinked. |
previousStepId | string | No | Explicit previous step pointer in the sequence. |
canvasPosition | object | No | Optional { "x": 100, "y": 200 } canvas coordinates for UI rendering. |
cURL Example (Add AI Summarizer Step)
curl -X POST "https://posttu.com/api/v1/workflow/wkf_abc123/step" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "ai_ask_ai",
"displayName": "Generate Tweet Summary",
"settings": {
"prompt": "Summarize this article into a compelling 280-character post: {{trigger.item.description}}",
"model": "gpt-4o"
}
}'
Response Example
{
"data": {
"id": "step_789xyz",
"versionId": "ver_draft_101",
"name": "ai_ask_ai",
"displayName": "Generate Tweet Summary",
"settings": {
"prompt": "Summarize this article into a compelling 280-character post: {{trigger.item.description}}",
"model": "gpt-4o"
},
"parentStepId": null,
"branchId": null,
"previousStepId": null,
"createdAt": "2026-07-29T22:19:00.000Z"
},
"success": true
}
Authorizations
Body
application/json
Response
Step details
Last modified on October 24, 2026

