Workflows
Create an empty workflow draft
Write the workflow draft shared with the Console builder.
POST
/
api
/
v3
/
workflows
Create an empty workflow draft
curl --request POST \
--url https://api.forge.gloo.com/api/v3/workflows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"factoryId": "<string>",
"description": "<string>",
"workflowInputSchema": [
{
"name": "<string>",
"required": true,
"default": "<unknown>",
"description": "<string>",
"validation": {
"enum": [
"<unknown>"
],
"min": 123,
"max": 123,
"pattern": "<string>"
},
"asset": true,
"defaultExpr": "<string>"
}
]
}
'import requests
url = "https://api.forge.gloo.com/api/v3/workflows"
payload = {
"name": "<string>",
"factoryId": "<string>",
"description": "<string>",
"workflowInputSchema": [
{
"name": "<string>",
"required": True,
"default": "<unknown>",
"description": "<string>",
"validation": {
"enum": ["<unknown>"],
"min": 123,
"max": 123,
"pattern": "<string>"
},
"asset": True,
"defaultExpr": "<string>"
}
]
}
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({
name: '<string>',
factoryId: '<string>',
description: '<string>',
workflowInputSchema: [
{
name: '<string>',
required: true,
default: '<unknown>',
description: '<string>',
validation: {enum: ['<unknown>'], min: 123, max: 123, pattern: '<string>'},
asset: true,
defaultExpr: '<string>'
}
]
})
};
fetch('https://api.forge.gloo.com/api/v3/workflows', 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.forge.gloo.com/api/v3/workflows",
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([
'name' => '<string>',
'factoryId' => '<string>',
'description' => '<string>',
'workflowInputSchema' => [
[
'name' => '<string>',
'required' => true,
'default' => '<unknown>',
'description' => '<string>',
'validation' => [
'enum' => [
'<unknown>'
],
'min' => 123,
'max' => 123,
'pattern' => '<string>'
],
'asset' => true,
'defaultExpr' => '<string>'
]
]
]),
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.forge.gloo.com/api/v3/workflows"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"factoryId\": \"<string>\",\n \"description\": \"<string>\",\n \"workflowInputSchema\": [\n {\n \"name\": \"<string>\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"validation\": {\n \"enum\": [\n \"<unknown>\"\n ],\n \"min\": 123,\n \"max\": 123,\n \"pattern\": \"<string>\"\n },\n \"asset\": true,\n \"defaultExpr\": \"<string>\"\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.forge.gloo.com/api/v3/workflows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"factoryId\": \"<string>\",\n \"description\": \"<string>\",\n \"workflowInputSchema\": [\n {\n \"name\": \"<string>\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"validation\": {\n \"enum\": [\n \"<unknown>\"\n ],\n \"min\": 123,\n \"max\": 123,\n \"pattern\": \"<string>\"\n },\n \"asset\": true,\n \"defaultExpr\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forge.gloo.com/api/v3/workflows")
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 \"name\": \"<string>\",\n \"factoryId\": \"<string>\",\n \"description\": \"<string>\",\n \"workflowInputSchema\": [\n {\n \"name\": \"<string>\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"validation\": {\n \"enum\": [\n \"<unknown>\"\n ],\n \"min\": 123,\n \"max\": 123,\n \"pattern\": \"<string>\"\n },\n \"asset\": true,\n \"defaultExpr\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workflowId": "<string>",
"draftId": "<string>"
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "resource_missing",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "conflict",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unprocessable",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.
v2 compatibility notes
POST /api/v2/workflows/create
Requires workflows:write and workflows:read: the credential’s scopes must reach both, and its grants must hold both at the target workflow home. The Console builder observes the committed draft immediately.
An organization-owned External App creates at its owning unit: without factoryId, the owning org unit becomes the workflow home, and a supplied factory must already have a home within that unit’s tree. A Personal key creates as its owner, at the home the Console gives that person’s workflow (the factory’s, else the owner’s, else the deployment root); a supplied factory must be one the key may read, and the workflow is stamped with the owner. A platform key cannot create, and neither can an app without a resolvable owning unit: both receive 403. Malformed, missing, unhomed and out-of-reach factories receive the same 404 resource_missing.
The strict body accepts name, optional description, optional factoryId, and optional workflowInputSchema. A missing input contract becomes []. Success is 201 with { data: { workflowId, draftId }, meta: { requestId } }.
Names are trimmed. Empty names, unknown keys, malformed JSON and wrong field types answer 400 bad_request. A duplicate (factoryId, name) answers409 conflict, including a clash in another home, matching Console uniqueness. Canonical input authoring errors, including unknown fiscal calendars, answer 422 unprocessable with the canonical message. Refusals make no draft-domain changes.
Send Idempotency-Key for a stable intent. Within its original 24-hour claim, repeat the identical body and key: the recorded 201/200 result is disclosed only if the caller still holds route permission and can read the original draft at its stored home. A withheld result or unknown outcome answers409 and does not write again. Reconcile authorized draft state before a new intent; after retention a repeat can execute again. Static External App companion keys do not support keyed replay.
Publishing (publishDraft), versions, graph editing, credentials, vaults and live execution stay outside this operation; output and notification settings, default agents and the runtime contract are set with updateDraft. No person identity or principal field can be supplied.Authorizations
BearerAuthPlatformApiKeyPersonalKey
Body
application/json
⌘I
Create an empty workflow draft
curl --request POST \
--url https://api.forge.gloo.com/api/v3/workflows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"factoryId": "<string>",
"description": "<string>",
"workflowInputSchema": [
{
"name": "<string>",
"required": true,
"default": "<unknown>",
"description": "<string>",
"validation": {
"enum": [
"<unknown>"
],
"min": 123,
"max": 123,
"pattern": "<string>"
},
"asset": true,
"defaultExpr": "<string>"
}
]
}
'import requests
url = "https://api.forge.gloo.com/api/v3/workflows"
payload = {
"name": "<string>",
"factoryId": "<string>",
"description": "<string>",
"workflowInputSchema": [
{
"name": "<string>",
"required": True,
"default": "<unknown>",
"description": "<string>",
"validation": {
"enum": ["<unknown>"],
"min": 123,
"max": 123,
"pattern": "<string>"
},
"asset": True,
"defaultExpr": "<string>"
}
]
}
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({
name: '<string>',
factoryId: '<string>',
description: '<string>',
workflowInputSchema: [
{
name: '<string>',
required: true,
default: '<unknown>',
description: '<string>',
validation: {enum: ['<unknown>'], min: 123, max: 123, pattern: '<string>'},
asset: true,
defaultExpr: '<string>'
}
]
})
};
fetch('https://api.forge.gloo.com/api/v3/workflows', 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.forge.gloo.com/api/v3/workflows",
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([
'name' => '<string>',
'factoryId' => '<string>',
'description' => '<string>',
'workflowInputSchema' => [
[
'name' => '<string>',
'required' => true,
'default' => '<unknown>',
'description' => '<string>',
'validation' => [
'enum' => [
'<unknown>'
],
'min' => 123,
'max' => 123,
'pattern' => '<string>'
],
'asset' => true,
'defaultExpr' => '<string>'
]
]
]),
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.forge.gloo.com/api/v3/workflows"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"factoryId\": \"<string>\",\n \"description\": \"<string>\",\n \"workflowInputSchema\": [\n {\n \"name\": \"<string>\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"validation\": {\n \"enum\": [\n \"<unknown>\"\n ],\n \"min\": 123,\n \"max\": 123,\n \"pattern\": \"<string>\"\n },\n \"asset\": true,\n \"defaultExpr\": \"<string>\"\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.forge.gloo.com/api/v3/workflows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"factoryId\": \"<string>\",\n \"description\": \"<string>\",\n \"workflowInputSchema\": [\n {\n \"name\": \"<string>\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"validation\": {\n \"enum\": [\n \"<unknown>\"\n ],\n \"min\": 123,\n \"max\": 123,\n \"pattern\": \"<string>\"\n },\n \"asset\": true,\n \"defaultExpr\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.forge.gloo.com/api/v3/workflows")
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 \"name\": \"<string>\",\n \"factoryId\": \"<string>\",\n \"description\": \"<string>\",\n \"workflowInputSchema\": [\n {\n \"name\": \"<string>\",\n \"required\": true,\n \"default\": \"<unknown>\",\n \"description\": \"<string>\",\n \"validation\": {\n \"enum\": [\n \"<unknown>\"\n ],\n \"min\": 123,\n \"max\": 123,\n \"pattern\": \"<string>\"\n },\n \"asset\": true,\n \"defaultExpr\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"workflowId": "<string>",
"draftId": "<string>"
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "bad_request",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "forbidden",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "resource_missing",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "conflict",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unprocessable",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}{
"error": {
"code": "unauthorized",
"message": "<string>",
"docUrl": "<string>",
"reason": "requester_unavailable",
"requiredPermission": "<string>",
"personRequired": true,
"decisionId": "<string>",
"capHeadroom": {
"remainingCents": 123,
"capCents": 123,
"consumedCents": 123,
"estimateCents": 123
},
"details": [
{
"path": "<string>",
"param": "<string>",
"message": "<string>",
"code": "required"
}
]
},
"meta": {
"requestId": "<string>",
"hasMore": true,
"nextCursor": "<string>",
"asOf": 123
}
}
