Update a workflow
curl --request PATCH \
--url https://api.langdock.com/workflows/v1/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"timezone": "<string>",
"nodes": [
{}
],
"edges": [
{}
],
"patch": {},
"limits": {}
}
'import requests
url = "https://api.langdock.com/workflows/v1/update"
payload = {
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"timezone": "<string>",
"nodes": [{}],
"edges": [{}],
"patch": {},
"limits": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflowId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>',
timezone: '<string>',
nodes: [{}],
edges: [{}],
patch: {},
limits: {}
})
};
fetch('https://api.langdock.com/workflows/v1/update', 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.langdock.com/workflows/v1/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'workflowId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>',
'timezone' => '<string>',
'nodes' => [
[
]
],
'edges' => [
[
]
],
'patch' => [
],
'limits' => [
]
]),
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://api.langdock.com/workflows/v1/update"
payload := strings.NewReader("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.langdock.com/workflows/v1/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.langdock.com/workflows/v1/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}"
response = http.request(request)
puts response.read_bodyWorkflow API
Update Workflow
Update workflow metadata or the draft graph
PATCH
/
workflows
/
v1
/
update
Update a workflow
curl --request PATCH \
--url https://api.langdock.com/workflows/v1/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"timezone": "<string>",
"nodes": [
{}
],
"edges": [
{}
],
"patch": {},
"limits": {}
}
'import requests
url = "https://api.langdock.com/workflows/v1/update"
payload = {
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"timezone": "<string>",
"nodes": [{}],
"edges": [{}],
"patch": {},
"limits": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflowId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>',
timezone: '<string>',
nodes: [{}],
edges: [{}],
patch: {},
limits: {}
})
};
fetch('https://api.langdock.com/workflows/v1/update', 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.langdock.com/workflows/v1/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'workflowId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>',
'timezone' => '<string>',
'nodes' => [
[
]
],
'edges' => [
[
]
],
'patch' => [
],
'limits' => [
]
]),
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://api.langdock.com/workflows/v1/update"
payload := strings.NewReader("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.langdock.com/workflows/v1/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.langdock.com/workflows/v1/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflowId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"timezone\": \"<string>\",\n \"nodes\": [\n {}\n ],\n \"edges\": [\n {}\n ],\n \"patch\": {},\n \"limits\": {}\n}"
response = http.request(request)
puts response.read_bodyUpdates metadata or the draft graph for a workflow the API key user can edit. Updating the draft does not publish a new version.
Send either metadata (including
To replace the draft graph, send both
limits) or a graph update in one request. Do not mix them.
Base URL
https://api.langdock.com/workflows/v1/update
Dedicated deploymentsReplace
api.langdock.com with <your-deployment-url>/api/public in all requests.Required scopes
This endpoint requires theWORKFLOW_WRITE_API scope (Workflow Write API) and editor access.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workflowId | string | Yes | UUID of the workflow. |
name | string | No | Workflow name. Maximum: 60 characters. |
description | string | No | Workflow description. Maximum: 500 characters. |
status | string | No | ACTIVE or INACTIVE. ACTIVE requires a published version. Use INACTIVE to pause a live workflow. |
timezone | string | No | Valid IANA timezone. Stored when status is omitted or ACTIVE. Ignored when status is INACTIVE so a pause does not overwrite the scheduled cron timezone. |
nodes | array | No | Full draft node replacement. Must be sent together with edges, and not with patch or metadata. |
edges | array | No | Full draft edge replacement. Must be sent together with nodes. |
patch | object | No | Incremental graph operations instead of a full nodes and edges replacement. Cannot be sent with nodes and edges or with metadata. |
limits | object | No | Execution caps. Omitted fields stay unchanged. Send null on a field to clear it. May be sent with other metadata, not with a graph update. |
nodes and edges. To apply an incremental graph edit, send patch. Sending a redacted secret value from get keeps the stored secret. Send a new non-empty value to rotate a secret, or null to clear a secret-named field.
Example
const axios = require("axios");
async function pauseWorkflow(workflowId) {
const response = await axios.patch(
"https://api.langdock.com/workflows/v1/update",
{
workflowId,
status: "INACTIVE"
},
{
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
}
);
console.log("Status:", response.data.workflow.status);
}
pauseWorkflow("550e8400-e29b-41d4-a716-446655440000");
Response format
Success response (200 OK)
{
status: "success";
message: "Workflow updated successfully";
workflow: object;
}
workflow matches the object on Workflow API Overview.
Error handling
| Status code | Description |
|---|---|
| 400 | Invalid body, mixed graph and metadata, nodes without edges, no fields, or activate without a published version |
| 401 | Invalid or missing API key |
| 403 | Missing WORKFLOW_WRITE_API scope or editor access. A missing workflow, a template, or a workflow in another workspace also returns this status. A Meeting End graph write without Meetings returns MEETINGS_FEATURE_FLAG_DISABLED. |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.
Authorizations
API key as Bearer token. Format "Bearer YOUR_API_KEY"
Body
application/json
Maximum string length:
60Maximum string length:
500Available options:
ACTIVE, INACTIVE Valid IANA timezone.
Incremental graph operations. Cannot be sent with nodes and edges or with metadata.
Execution caps. Omitted fields stay unchanged. Send null on a field to clear it.
Response
Workflow updated successfully
Was this page helpful?