curl --request POST \
--url https://api.deck.co/v2/workflows/{workflow_id}/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"steps": [
{
"name": "check_price",
"credential_id": "<string>",
"source_id": "<string>",
"input": {}
}
]
}
'import requests
url = "https://api.deck.co/v2/workflows/{workflow_id}/run"
payload = { "steps": [
{
"name": "check_price",
"credential_id": "<string>",
"source_id": "<string>",
"input": {}
}
] }
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({
steps: [
{
name: 'check_price',
credential_id: '<string>',
source_id: '<string>',
input: {}
}
]
})
};
fetch('https://api.deck.co/v2/workflows/{workflow_id}/run', 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}/run",
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([
'steps' => [
[
'name' => 'check_price',
'credential_id' => '<string>',
'source_id' => '<string>',
'input' => [
]
]
]
]),
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}/run"
payload := strings.NewReader("{\n \"steps\": [\n {\n \"name\": \"check_price\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {}\n }\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://api.deck.co/v2/workflows/{workflow_id}/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"steps\": [\n {\n \"name\": \"check_price\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deck.co/v2/workflows/{workflow_id}/run")
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 \"steps\": [\n {\n \"name\": \"check_price\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "wrun_AbC123xYz456",
"object": "<string>",
"workflow_id": "wflo_AbC123xYz456",
"status": "queued",
"result": "<string>",
"runtime_ms": 123,
"session_id": "<string>",
"trigger_id": "<string>",
"steps": [
{
"name": "<string>",
"type": "task",
"status": "<string>",
"output": "<unknown>",
"task_runs": [
{
"task_run_id": "trun_AbC123xYz456",
"status": "<string>",
"result": "<string>",
"created_at": "2026-06-18T00:00:00Z",
"runtime_ms": 123,
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"item": "<unknown>",
"input": "<unknown>",
"storage": [
{
"id": "stor_AbC123xYz456",
"object": "<string>",
"file_name": "<string>",
"file_type": "<string>",
"file_size": 123,
"purpose": "attachment",
"created_at": "2026-08-24T12:00:00Z",
"url": "<string>",
"extraction": "<unknown>"
}
],
"artifacts": {
"screenshots": [
{
"file_name": "<string>",
"file_type": "<string>",
"file_size": 123,
"created_at": "2026-08-24T12:00:00Z",
"url": "<string>",
"reasoning": "<string>"
}
]
}
}
]
}
],
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>",
"step": "<string>"
}
],
"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>"
}Run a workflow
Runs a workflow. Returns immediately with the run queued.
curl --request POST \
--url https://api.deck.co/v2/workflows/{workflow_id}/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"steps": [
{
"name": "check_price",
"credential_id": "<string>",
"source_id": "<string>",
"input": {}
}
]
}
'import requests
url = "https://api.deck.co/v2/workflows/{workflow_id}/run"
payload = { "steps": [
{
"name": "check_price",
"credential_id": "<string>",
"source_id": "<string>",
"input": {}
}
] }
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({
steps: [
{
name: 'check_price',
credential_id: '<string>',
source_id: '<string>',
input: {}
}
]
})
};
fetch('https://api.deck.co/v2/workflows/{workflow_id}/run', 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}/run",
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([
'steps' => [
[
'name' => 'check_price',
'credential_id' => '<string>',
'source_id' => '<string>',
'input' => [
]
]
]
]),
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}/run"
payload := strings.NewReader("{\n \"steps\": [\n {\n \"name\": \"check_price\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {}\n }\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://api.deck.co/v2/workflows/{workflow_id}/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"steps\": [\n {\n \"name\": \"check_price\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deck.co/v2/workflows/{workflow_id}/run")
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 \"steps\": [\n {\n \"name\": \"check_price\",\n \"credential_id\": \"<string>\",\n \"source_id\": \"<string>\",\n \"input\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "wrun_AbC123xYz456",
"object": "<string>",
"workflow_id": "wflo_AbC123xYz456",
"status": "queued",
"result": "<string>",
"runtime_ms": 123,
"session_id": "<string>",
"trigger_id": "<string>",
"steps": [
{
"name": "<string>",
"type": "task",
"status": "<string>",
"output": "<unknown>",
"task_runs": [
{
"task_run_id": "trun_AbC123xYz456",
"status": "<string>",
"result": "<string>",
"created_at": "2026-06-18T00:00:00Z",
"runtime_ms": 123,
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
],
"item": "<unknown>",
"input": "<unknown>",
"storage": [
{
"id": "stor_AbC123xYz456",
"object": "<string>",
"file_name": "<string>",
"file_type": "<string>",
"file_size": 123,
"purpose": "attachment",
"created_at": "2026-08-24T12:00:00Z",
"url": "<string>",
"extraction": "<unknown>"
}
],
"artifacts": {
"screenshots": [
{
"file_name": "<string>",
"file_type": "<string>",
"file_size": 123,
"created_at": "2026-08-24T12:00:00Z",
"url": "<string>",
"reasoning": "<string>"
}
]
}
}
]
}
],
"errors": [
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"field": "<string>",
"step": "<string>"
}
],
"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 running a workflow. The body may be empty.
Per-step overrides. Steps you don't list run exactly as defined.
Show child attributes
Show child attributes
Response
Created
Workflow run object.
Unique identifier for the workflow run, prefixed with wrun_.
^wrun_"wrun_AbC123xYz456"
Always workflow_run.
The workflow that was run.
^wflo_"wflo_AbC123xYz456"
Lifecycle state. paused means the current step is waiting on external input; the step's own status carries the reason.
queued, running, paused, completed, failed, canceling, canceled Outcome once terminal: success only when every task run succeeded, failure if any failed, unknown otherwise. null while running and for a canceled run.
Milliseconds from the first step's start until the run reached a terminal status, excluding time spent queued. null until terminal.
The session every step of this run executes in. Prefixed with sess_. Assigned when the run is created through the API, or when a trigger-created run is admitted, so null while such a run is queued.
The trigger that created this run. Prefixed with trg_. null for runs created through the API.
Per-step state, in definition order.
Show child attributes
Show child attributes
Error objects, each naming its step, when the run failed. null otherwise.
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?