Workflows
Get a workflow
One workflow with its steps (nodes, credentials redacted), connections (edges) and the input fields its steps read.
GET
/
api
/
workflows
/
{id}
Get a workflow
curl --request GET \
--url https://api.hitl.sh/v1/api/workflows/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hitl.sh/v1/api/workflows/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hitl.sh/v1/api/workflows/{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.hitl.sh/v1/api/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hitl.sh/v1/api/workflows/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hitl.sh/v1/api/workflows/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hitl.sh/v1/api/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "6af2ce4e8207961501f59472",
"name": "Refund approval",
"description": "A support lead approves, denies or escalates refunds over $100.",
"status": "active",
"trigger": {
"type": "webhook",
"webhook_id": "wf_26db308d0ea2bfd5427999311a169b3b"
},
"steps": 6,
"has_review": true,
"runnable": true,
"execution_count": 4,
"last_executed_at": "2026-11-10T08:00:07.228Z",
"created_at": "2026-11-10T07:57:02.477Z",
"updated_at": "2026-11-10T07:57:05.452Z",
"nodes": [
{
"id": "trigger-1",
"type": "trigger",
"data": {
"label": "Webhook",
"triggerType": "webhook",
"workflowIcon": {
"color": "peach",
"type": "set",
"value": "receipt"
}
}
},
{
"id": "review-1",
"type": "review",
"data": {
"label": "Approve refund",
"priority": "high",
"requestText": "**Refund request**\n\n| | |\n|---|---|\n| Customer | {{trigger.body.customer.name}} ({{trigger.body.customer.email}}) |\n| Order | {{trigger.body.order_id}} |\n| Amount | ${{trigger.body.amount}} {{trigger.body.currency}} |\n\n**Reason:** {{trigger.body.reason}}",
"responseConfig": {
"options": [
{
"label": "Approve refund",
"value": "approve"
},
{
"label": "Deny",
"value": "deny"
},
{
"label": "Escalate to manager",
"value": "escalate"
}
],
"required": true
},
"responseType": "single_select",
"timeout": "7200"
}
},
{
"id": "condition-1",
"type": "condition",
"data": {
"field": "response.value",
"label": "Approved?",
"operator": "equals",
"value": "approve"
}
},
{
"id": "action-1",
"type": "action",
"data": {
"actionType": "webhook",
"body": "{\"order_id\": \"{{trigger.body.order_id}}\", \"amount\": {{trigger.body.amount}}, \"approved_by\": \"{{response.by.name}}\"}",
"label": "Issue the refund",
"method": "POST",
"name": "Issue the refund",
"url": "https://httpbin.org/post"
}
},
{
"id": "action-2",
"type": "action",
"data": {
"actionType": "webhook",
"body": "{\"order_id\": \"{{trigger.body.order_id}}\", \"decision\": \"{{response.value}}\"}",
"label": "Email the customer",
"method": "POST",
"name": "Email the customer",
"url": "https://httpbin.org/post"
}
},
{
"id": "end-1",
"type": "end",
"data": {
"label": "End"
}
}
],
"edges": [
{
"id": "e1",
"source": "trigger-1",
"target": "review-1"
},
{
"id": "e2",
"source": "review-1",
"target": "condition-1"
},
{
"id": "e3",
"source": "condition-1",
"target": "action-1",
"source_handle": "yes"
},
{
"id": "e4",
"source": "condition-1",
"target": "action-2",
"source_handle": "no"
},
{
"id": "e5",
"source": "action-1",
"target": "end-1"
},
{
"id": "e6",
"source": "action-2",
"target": "end-1"
}
],
"input_fields": [
{
"path": "amount",
"used_by": [
"action-1",
"review-1"
]
},
{
"path": "currency",
"used_by": [
"review-1"
]
},
{
"path": "customer.email",
"used_by": [
"review-1"
]
},
{
"path": "customer.name",
"used_by": [
"review-1"
]
},
{
"path": "order_id",
"used_by": [
"action-1",
"action-2",
"review-1"
]
},
{
"path": "reason",
"used_by": [
"review-1"
]
}
]
},
"error": false,
"msg": "Workflow retrieved"
}{
"error": true,
"msg": "Invalid API key"
}{
"error": true,
"msg": "Workflow not found"
}⌘I
Get a workflow
curl --request GET \
--url https://api.hitl.sh/v1/api/workflows/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hitl.sh/v1/api/workflows/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hitl.sh/v1/api/workflows/{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.hitl.sh/v1/api/workflows/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hitl.sh/v1/api/workflows/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hitl.sh/v1/api/workflows/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hitl.sh/v1/api/workflows/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "6af2ce4e8207961501f59472",
"name": "Refund approval",
"description": "A support lead approves, denies or escalates refunds over $100.",
"status": "active",
"trigger": {
"type": "webhook",
"webhook_id": "wf_26db308d0ea2bfd5427999311a169b3b"
},
"steps": 6,
"has_review": true,
"runnable": true,
"execution_count": 4,
"last_executed_at": "2026-11-10T08:00:07.228Z",
"created_at": "2026-11-10T07:57:02.477Z",
"updated_at": "2026-11-10T07:57:05.452Z",
"nodes": [
{
"id": "trigger-1",
"type": "trigger",
"data": {
"label": "Webhook",
"triggerType": "webhook",
"workflowIcon": {
"color": "peach",
"type": "set",
"value": "receipt"
}
}
},
{
"id": "review-1",
"type": "review",
"data": {
"label": "Approve refund",
"priority": "high",
"requestText": "**Refund request**\n\n| | |\n|---|---|\n| Customer | {{trigger.body.customer.name}} ({{trigger.body.customer.email}}) |\n| Order | {{trigger.body.order_id}} |\n| Amount | ${{trigger.body.amount}} {{trigger.body.currency}} |\n\n**Reason:** {{trigger.body.reason}}",
"responseConfig": {
"options": [
{
"label": "Approve refund",
"value": "approve"
},
{
"label": "Deny",
"value": "deny"
},
{
"label": "Escalate to manager",
"value": "escalate"
}
],
"required": true
},
"responseType": "single_select",
"timeout": "7200"
}
},
{
"id": "condition-1",
"type": "condition",
"data": {
"field": "response.value",
"label": "Approved?",
"operator": "equals",
"value": "approve"
}
},
{
"id": "action-1",
"type": "action",
"data": {
"actionType": "webhook",
"body": "{\"order_id\": \"{{trigger.body.order_id}}\", \"amount\": {{trigger.body.amount}}, \"approved_by\": \"{{response.by.name}}\"}",
"label": "Issue the refund",
"method": "POST",
"name": "Issue the refund",
"url": "https://httpbin.org/post"
}
},
{
"id": "action-2",
"type": "action",
"data": {
"actionType": "webhook",
"body": "{\"order_id\": \"{{trigger.body.order_id}}\", \"decision\": \"{{response.value}}\"}",
"label": "Email the customer",
"method": "POST",
"name": "Email the customer",
"url": "https://httpbin.org/post"
}
},
{
"id": "end-1",
"type": "end",
"data": {
"label": "End"
}
}
],
"edges": [
{
"id": "e1",
"source": "trigger-1",
"target": "review-1"
},
{
"id": "e2",
"source": "review-1",
"target": "condition-1"
},
{
"id": "e3",
"source": "condition-1",
"target": "action-1",
"source_handle": "yes"
},
{
"id": "e4",
"source": "condition-1",
"target": "action-2",
"source_handle": "no"
},
{
"id": "e5",
"source": "action-1",
"target": "end-1"
},
{
"id": "e6",
"source": "action-2",
"target": "end-1"
}
],
"input_fields": [
{
"path": "amount",
"used_by": [
"action-1",
"review-1"
]
},
{
"path": "currency",
"used_by": [
"review-1"
]
},
{
"path": "customer.email",
"used_by": [
"review-1"
]
},
{
"path": "customer.name",
"used_by": [
"review-1"
]
},
{
"path": "order_id",
"used_by": [
"action-1",
"action-2",
"review-1"
]
},
{
"path": "reason",
"used_by": [
"review-1"
]
}
]
},
"error": false,
"msg": "Workflow retrieved"
}{
"error": true,
"msg": "Invalid API key"
}{
"error": true,
"msg": "Workflow not found"
}