curl --request PUT \
--url https://workflows.pingmee.co.il/workflows/{workflowId} \
--header 'Content-Type: application/json' \
--header 'Cookie: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"isActive": true,
"lastModified": 123,
"associatedToBusinessId": "<string>",
"triggerType": "<string>",
"variables": {},
"data": {
"nodes": [
{
"id": "<string>",
"type": "<string>",
"category": "<string>",
"position": {
"x": 123,
"y": 123
},
"parentId": "<string>",
"draggable": true,
"selected": true,
"data": {}
}
],
"edges": [
{
"id": "<string>",
"source": "<string>",
"target": "<string>",
"sourceHandle": "<string>",
"targetHandle": "<string>",
"type": "<string>"
}
]
},
"parsedData": [
{
"id": "<string>",
"type": "<string>",
"category": "<string>",
"data": {},
"connections": {},
"parentId": "<string>",
"title": "<string>",
"subNodes": "<array>"
}
],
"settings": {},
"notes": "<string>"
}
'import requests
url = "https://workflows.pingmee.co.il/workflows/{workflowId}"
payload = {
"name": "<string>",
"isActive": True,
"lastModified": 123,
"associatedToBusinessId": "<string>",
"triggerType": "<string>",
"variables": {},
"data": {
"nodes": [
{
"id": "<string>",
"type": "<string>",
"category": "<string>",
"position": {
"x": 123,
"y": 123
},
"parentId": "<string>",
"draggable": True,
"selected": True,
"data": {}
}
],
"edges": [
{
"id": "<string>",
"source": "<string>",
"target": "<string>",
"sourceHandle": "<string>",
"targetHandle": "<string>",
"type": "<string>"
}
]
},
"parsedData": [
{
"id": "<string>",
"type": "<string>",
"category": "<string>",
"data": {},
"connections": {},
"parentId": "<string>",
"title": "<string>",
"subNodes": "<array>"
}
],
"settings": {},
"notes": "<string>"
}
headers = {
"Cookie": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Cookie: '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
isActive: true,
lastModified: 123,
associatedToBusinessId: '<string>',
triggerType: '<string>',
variables: {},
data: {
nodes: [
{
id: '<string>',
type: '<string>',
category: '<string>',
position: {x: 123, y: 123},
parentId: '<string>',
draggable: true,
selected: true,
data: {}
}
],
edges: [
{
id: '<string>',
source: '<string>',
target: '<string>',
sourceHandle: '<string>',
targetHandle: '<string>',
type: '<string>'
}
]
},
parsedData: [
{
id: '<string>',
type: '<string>',
category: '<string>',
data: {},
connections: {},
parentId: '<string>',
title: '<string>',
subNodes: '<array>'
}
],
settings: {},
notes: '<string>'
})
};
fetch('https://workflows.pingmee.co.il/workflows/{workflowId}', 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://workflows.pingmee.co.il/workflows/{workflowId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'isActive' => true,
'lastModified' => 123,
'associatedToBusinessId' => '<string>',
'triggerType' => '<string>',
'variables' => [
],
'data' => [
'nodes' => [
[
'id' => '<string>',
'type' => '<string>',
'category' => '<string>',
'position' => [
'x' => 123,
'y' => 123
],
'parentId' => '<string>',
'draggable' => true,
'selected' => true,
'data' => [
]
]
],
'edges' => [
[
'id' => '<string>',
'source' => '<string>',
'target' => '<string>',
'sourceHandle' => '<string>',
'targetHandle' => '<string>',
'type' => '<string>'
]
]
],
'parsedData' => [
[
'id' => '<string>',
'type' => '<string>',
'category' => '<string>',
'data' => [
],
'connections' => [
],
'parentId' => '<string>',
'title' => '<string>',
'subNodes' => '<array>'
]
],
'settings' => [
],
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Cookie: <api-key>",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://workflows.pingmee.co.il/workflows/{workflowId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"isActive\": true,\n \"lastModified\": 123,\n \"associatedToBusinessId\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"variables\": {},\n \"data\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n },\n \"parentId\": \"<string>\",\n \"draggable\": true,\n \"selected\": true,\n \"data\": {}\n }\n ],\n \"edges\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"sourceHandle\": \"<string>\",\n \"targetHandle\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n },\n \"parsedData\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"data\": {},\n \"connections\": {},\n \"parentId\": \"<string>\",\n \"title\": \"<string>\",\n \"subNodes\": \"<array>\"\n }\n ],\n \"settings\": {},\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Cookie", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
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.put("https://workflows.pingmee.co.il/workflows/{workflowId}")
.header("Cookie", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"isActive\": true,\n \"lastModified\": 123,\n \"associatedToBusinessId\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"variables\": {},\n \"data\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n },\n \"parentId\": \"<string>\",\n \"draggable\": true,\n \"selected\": true,\n \"data\": {}\n }\n ],\n \"edges\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"sourceHandle\": \"<string>\",\n \"targetHandle\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n },\n \"parsedData\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"data\": {},\n \"connections\": {},\n \"parentId\": \"<string>\",\n \"title\": \"<string>\",\n \"subNodes\": \"<array>\"\n }\n ],\n \"settings\": {},\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://workflows.pingmee.co.il/workflows/{workflowId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Cookie"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"isActive\": true,\n \"lastModified\": 123,\n \"associatedToBusinessId\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"variables\": {},\n \"data\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n },\n \"parentId\": \"<string>\",\n \"draggable\": true,\n \"selected\": true,\n \"data\": {}\n }\n ],\n \"edges\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"sourceHandle\": \"<string>\",\n \"targetHandle\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n },\n \"parsedData\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"data\": {},\n \"connections\": {},\n \"parentId\": \"<string>\",\n \"title\": \"<string>\",\n \"subNodes\": \"<array>\"\n }\n ],\n \"settings\": {},\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Workflow 'wf_welcome' updated successfully.",
"lastModified": 123
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"message": "Workflow was updated elsewhere. Reload and try again.",
"lastModified": 123
}Update Workflow
Update a workflow. name, isActive, settings, and associatedToBusinessId can be sent alone — including { isActive: true } to activate without sending a graph. If data or parsedData is present, this is a graph update: also send trigger, triggerType, variables, and lastModified from the last GET or create, or the API returns 409. Always send both data and parsedData plus trigger / triggerType on graph save. Do not send analytics. A graph PUT prunes stored analytics for node, edge, and button ids that are no longer on the graph — GET fresh analytics before rewriting.
Before building data / parsedData, read /build-workflows/overview and /build-workflows/analytics. Path workflowId must be URL-encoded.
curl --request PUT \
--url https://workflows.pingmee.co.il/workflows/{workflowId} \
--header 'Content-Type: application/json' \
--header 'Cookie: <api-key>' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"isActive": true,
"lastModified": 123,
"associatedToBusinessId": "<string>",
"triggerType": "<string>",
"variables": {},
"data": {
"nodes": [
{
"id": "<string>",
"type": "<string>",
"category": "<string>",
"position": {
"x": 123,
"y": 123
},
"parentId": "<string>",
"draggable": true,
"selected": true,
"data": {}
}
],
"edges": [
{
"id": "<string>",
"source": "<string>",
"target": "<string>",
"sourceHandle": "<string>",
"targetHandle": "<string>",
"type": "<string>"
}
]
},
"parsedData": [
{
"id": "<string>",
"type": "<string>",
"category": "<string>",
"data": {},
"connections": {},
"parentId": "<string>",
"title": "<string>",
"subNodes": "<array>"
}
],
"settings": {},
"notes": "<string>"
}
'import requests
url = "https://workflows.pingmee.co.il/workflows/{workflowId}"
payload = {
"name": "<string>",
"isActive": True,
"lastModified": 123,
"associatedToBusinessId": "<string>",
"triggerType": "<string>",
"variables": {},
"data": {
"nodes": [
{
"id": "<string>",
"type": "<string>",
"category": "<string>",
"position": {
"x": 123,
"y": 123
},
"parentId": "<string>",
"draggable": True,
"selected": True,
"data": {}
}
],
"edges": [
{
"id": "<string>",
"source": "<string>",
"target": "<string>",
"sourceHandle": "<string>",
"targetHandle": "<string>",
"type": "<string>"
}
]
},
"parsedData": [
{
"id": "<string>",
"type": "<string>",
"category": "<string>",
"data": {},
"connections": {},
"parentId": "<string>",
"title": "<string>",
"subNodes": "<array>"
}
],
"settings": {},
"notes": "<string>"
}
headers = {
"Cookie": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
Cookie: '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
isActive: true,
lastModified: 123,
associatedToBusinessId: '<string>',
triggerType: '<string>',
variables: {},
data: {
nodes: [
{
id: '<string>',
type: '<string>',
category: '<string>',
position: {x: 123, y: 123},
parentId: '<string>',
draggable: true,
selected: true,
data: {}
}
],
edges: [
{
id: '<string>',
source: '<string>',
target: '<string>',
sourceHandle: '<string>',
targetHandle: '<string>',
type: '<string>'
}
]
},
parsedData: [
{
id: '<string>',
type: '<string>',
category: '<string>',
data: {},
connections: {},
parentId: '<string>',
title: '<string>',
subNodes: '<array>'
}
],
settings: {},
notes: '<string>'
})
};
fetch('https://workflows.pingmee.co.il/workflows/{workflowId}', 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://workflows.pingmee.co.il/workflows/{workflowId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'isActive' => true,
'lastModified' => 123,
'associatedToBusinessId' => '<string>',
'triggerType' => '<string>',
'variables' => [
],
'data' => [
'nodes' => [
[
'id' => '<string>',
'type' => '<string>',
'category' => '<string>',
'position' => [
'x' => 123,
'y' => 123
],
'parentId' => '<string>',
'draggable' => true,
'selected' => true,
'data' => [
]
]
],
'edges' => [
[
'id' => '<string>',
'source' => '<string>',
'target' => '<string>',
'sourceHandle' => '<string>',
'targetHandle' => '<string>',
'type' => '<string>'
]
]
],
'parsedData' => [
[
'id' => '<string>',
'type' => '<string>',
'category' => '<string>',
'data' => [
],
'connections' => [
],
'parentId' => '<string>',
'title' => '<string>',
'subNodes' => '<array>'
]
],
'settings' => [
],
'notes' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Cookie: <api-key>",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://workflows.pingmee.co.il/workflows/{workflowId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"isActive\": true,\n \"lastModified\": 123,\n \"associatedToBusinessId\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"variables\": {},\n \"data\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n },\n \"parentId\": \"<string>\",\n \"draggable\": true,\n \"selected\": true,\n \"data\": {}\n }\n ],\n \"edges\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"sourceHandle\": \"<string>\",\n \"targetHandle\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n },\n \"parsedData\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"data\": {},\n \"connections\": {},\n \"parentId\": \"<string>\",\n \"title\": \"<string>\",\n \"subNodes\": \"<array>\"\n }\n ],\n \"settings\": {},\n \"notes\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Cookie", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
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.put("https://workflows.pingmee.co.il/workflows/{workflowId}")
.header("Cookie", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"isActive\": true,\n \"lastModified\": 123,\n \"associatedToBusinessId\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"variables\": {},\n \"data\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n },\n \"parentId\": \"<string>\",\n \"draggable\": true,\n \"selected\": true,\n \"data\": {}\n }\n ],\n \"edges\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"sourceHandle\": \"<string>\",\n \"targetHandle\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n },\n \"parsedData\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"data\": {},\n \"connections\": {},\n \"parentId\": \"<string>\",\n \"title\": \"<string>\",\n \"subNodes\": \"<array>\"\n }\n ],\n \"settings\": {},\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://workflows.pingmee.co.il/workflows/{workflowId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Cookie"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"isActive\": true,\n \"lastModified\": 123,\n \"associatedToBusinessId\": \"<string>\",\n \"triggerType\": \"<string>\",\n \"variables\": {},\n \"data\": {\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"position\": {\n \"x\": 123,\n \"y\": 123\n },\n \"parentId\": \"<string>\",\n \"draggable\": true,\n \"selected\": true,\n \"data\": {}\n }\n ],\n \"edges\": [\n {\n \"id\": \"<string>\",\n \"source\": \"<string>\",\n \"target\": \"<string>\",\n \"sourceHandle\": \"<string>\",\n \"targetHandle\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n },\n \"parsedData\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\",\n \"category\": \"<string>\",\n \"data\": {},\n \"connections\": {},\n \"parentId\": \"<string>\",\n \"title\": \"<string>\",\n \"subNodes\": \"<array>\"\n }\n ],\n \"settings\": {},\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Workflow 'wf_welcome' updated successfully.",
"lastModified": 123
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"message": "Workflow was updated elsewhere. Reload and try again.",
"lastModified": 123
}workflowId in the path.
name, isActive, settings, and associatedToBusinessId can be sent alone. Create always stores a workflow inactive; activate without sending a graph:
{
"isActive": true
}
associatedToBusinessId (and platformType on create) from GET phone numbers. PUT persists associatedToBusinessId without a graph; platformType is stored from the create body.
Graph updates and optimistic lock
Ifdata or parsedData is present, this is a graph update. Also send trigger, triggerType, variables, and lastModified from the last GET or create. Always send both data and parsedData plus trigger / triggerType.
When lastModified does not match the server, the API returns 409 with the current lastModified. Reload and retry.
A graph PUT prunes stored analytics for node / edge / button ids that are no longer on the graph. GET fresh analytics before you rewrite, and do not send analytics in the body. See Workflow analytics.
data or parsedData, read Build workflows and the related cookbook pages.Authorizations
Personal access token from Pingmee Settings → Developer Tools
Business API key from Pingmee Settings → Developer Tools
Path Parameters
Workflow identifier. Must be URL-encoded when used in the path.
Body
Partial update. Send only the fields you want to change. Graph updates (data or parsedData present) require lastModified from the last GET or create.
Set true to activate. Create always stores false; activate with a separate PUT { isActive: true } (no graph required).
Required when data or parsedData is present. Echo the value from the last GET or create, or the API returns 409.
WhatsApp phone-number id from GET /phone-numbers (row id). PUT can change this field without sending a graph.
Execution node used in parsedData, trigger, and subNodes. Branching is which sub-node's connections.out — there are no handle ids here. Node data is a loose object; read /build-workflows/overview before building it.
Show child attributes
Show child attributes
React Flow canvas (workflow.data from toObject()). Required for the editor. Always send together with parsedData + trigger when saving a graph. Node form payloads are not fully specified here — read /build-workflows/overview before building data.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?