curl --request PATCH \
--url https://api.deck.co/v2/workflows/{workflow_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"steps": [
{
"name": "check_price",
"type": "task",
"task_id": "task_AbC123xYz456",
"credential_id": "<string>",
"source_id": "<string>",
"input": {},
"if": "steps.check_price.output.price_dropped == true"
}
]
}
'import requests
url = "https://api.deck.co/v2/workflows/{workflow_id}"
payload = {
"name": "<string>",
"steps": [
{
"name": "check_price",
"type": "task",
"task_id": "task_AbC123xYz456",
"credential_id": "<string>",
"source_id": "<string>",
"input": {},
"if": "steps.check_price.output.price_dropped == true"
}
]
}
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({
name: '<string>',
steps: [
{
name: 'check_price',
type: 'task',
task_id: 'task_AbC123xYz456',
credential_id: '<string>',
source_id: '<string>',
input: {},
if: 'steps.check_price.output.price_dropped == true'
}
]
})
};
fetch('https://api.deck.co/v2/workflows/{workflow_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.deck.co/v2/workflows/{workflow_id}",
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([
'name' => '<string>',
'steps' => [
[
'name' => 'check_price',
'type' => 'task',
'task_id' => 'task_AbC123xYz456',
'credential_id' => '<string>',
'source_id' => '<string>',
'input' => [
],
'if' => 'steps.check_price.output.price_dropped == true'
]
]
]),
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.deck.co/v2/workflows/{workflow_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"name\": \"check_price\",\n \"type\": \"task\",\n \"task_id\": \"task_AbC123xYz456\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {},\n \"if\": \"steps.check_price.output.price_dropped == true\"\n }\n ]\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.deck.co/v2/workflows/{workflow_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"name\": \"check_price\",\n \"type\": \"task\",\n \"task_id\": \"task_AbC123xYz456\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {},\n \"if\": \"steps.check_price.output.price_dropped == true\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deck.co/v2/workflows/{workflow_id}")
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 \"name\": \"<string>\",\n \"steps\": [\n {\n \"name\": \"check_price\",\n \"type\": \"task\",\n \"task_id\": \"task_AbC123xYz456\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {},\n \"if\": \"steps.check_price.output.price_dropped == true\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "wflo_AbC123xYz456",
"object": "<string>",
"name": "<string>",
"steps": [
{
"name": "check_price",
"type": "task",
"task_id": "task_AbC123xYz456",
"credential_id": "<string>",
"source_id": "<string>",
"input": {},
"if": "steps.check_price.output.price_dropped == true"
}
],
"created_at": "2026-06-18T00:00:00Z",
"updated_at": "2026-06-18T00:00:00Z",
"request_id": "<string>"
}{
"errors": {},
"type": "<string>",
"title": "<string>",
"status": 123,
"traceId": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}Update a workflow
Updates a workflow. Passing steps replaces the array wholesale. Edits apply to future runs only; runs already in flight continue against the definition they started with.
curl --request PATCH \
--url https://api.deck.co/v2/workflows/{workflow_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"steps": [
{
"name": "check_price",
"type": "task",
"task_id": "task_AbC123xYz456",
"credential_id": "<string>",
"source_id": "<string>",
"input": {},
"if": "steps.check_price.output.price_dropped == true"
}
]
}
'import requests
url = "https://api.deck.co/v2/workflows/{workflow_id}"
payload = {
"name": "<string>",
"steps": [
{
"name": "check_price",
"type": "task",
"task_id": "task_AbC123xYz456",
"credential_id": "<string>",
"source_id": "<string>",
"input": {},
"if": "steps.check_price.output.price_dropped == true"
}
]
}
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({
name: '<string>',
steps: [
{
name: 'check_price',
type: 'task',
task_id: 'task_AbC123xYz456',
credential_id: '<string>',
source_id: '<string>',
input: {},
if: 'steps.check_price.output.price_dropped == true'
}
]
})
};
fetch('https://api.deck.co/v2/workflows/{workflow_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.deck.co/v2/workflows/{workflow_id}",
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([
'name' => '<string>',
'steps' => [
[
'name' => 'check_price',
'type' => 'task',
'task_id' => 'task_AbC123xYz456',
'credential_id' => '<string>',
'source_id' => '<string>',
'input' => [
],
'if' => 'steps.check_price.output.price_dropped == true'
]
]
]),
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.deck.co/v2/workflows/{workflow_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"name\": \"check_price\",\n \"type\": \"task\",\n \"task_id\": \"task_AbC123xYz456\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {},\n \"if\": \"steps.check_price.output.price_dropped == true\"\n }\n ]\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.deck.co/v2/workflows/{workflow_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"steps\": [\n {\n \"name\": \"check_price\",\n \"type\": \"task\",\n \"task_id\": \"task_AbC123xYz456\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {},\n \"if\": \"steps.check_price.output.price_dropped == true\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deck.co/v2/workflows/{workflow_id}")
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 \"name\": \"<string>\",\n \"steps\": [\n {\n \"name\": \"check_price\",\n \"type\": \"task\",\n \"task_id\": \"task_AbC123xYz456\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {},\n \"if\": \"steps.check_price.output.price_dropped == true\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "wflo_AbC123xYz456",
"object": "<string>",
"name": "<string>",
"steps": [
{
"name": "check_price",
"type": "task",
"task_id": "task_AbC123xYz456",
"credential_id": "<string>",
"source_id": "<string>",
"input": {},
"if": "steps.check_price.output.price_dropped == true"
}
],
"created_at": "2026-06-18T00:00:00Z",
"updated_at": "2026-06-18T00:00:00Z",
"request_id": "<string>"
}{
"errors": {},
"type": "<string>",
"title": "<string>",
"status": 123,
"traceId": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}{
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"request_id": "<string>"
}Authorizations
Secret key (sk_live_...)
Headers
Optional key that makes the request idempotent. Retrying with the same key returns the original response instead of repeating the operation; keys expire after 24 hours. Any string up to 256 characters. See Idempotency.
256"550e8400-e29b-41d4-a716-446655440000"
Path Parameters
Unique identifier for the workflow (prefixed with wflo_).
^wflo_"wflo_AbC123xYz456"
Body
Request body for updating a workflow. Omit a field to leave it unchanged. Edits apply to future runs only.
Response
OK
Workflow definition object.
Unique identifier for the workflow, prefixed with wflo_.
^wflo_"wflo_AbC123xYz456"
Always workflow.
Display name.
Ordered array of step definitions.
One step of a workflow definition, discriminated by type.
- Option 1
- Option 2
Show child attributes
Show child attributes
"2026-06-18T00:00:00Z"
"2026-06-18T00:00:00Z"
Unique identifier for the API request. Include this when contacting support.
Was this page helpful?