Create a Workflow from Template
curl --request POST \
--url https://flowker.sandbox.lerian.net/v1/workflows/from-template \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"templateId": "payment-validation",
"params": {
"executorId": "a1b2c3d4-e5f6-4789-a012-345678901234",
"currency": "USD"
}
}
'import requests
url = "https://flowker.sandbox.lerian.net/v1/workflows/from-template"
payload = {
"templateId": "payment-validation",
"params": {
"executorId": "a1b2c3d4-e5f6-4789-a012-345678901234",
"currency": "USD"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
templateId: 'payment-validation',
params: {executorId: 'a1b2c3d4-e5f6-4789-a012-345678901234', currency: 'USD'}
})
};
fetch('https://flowker.sandbox.lerian.net/v1/workflows/from-template', 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://flowker.sandbox.lerian.net/v1/workflows/from-template",
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([
'templateId' => 'payment-validation',
'params' => [
'executorId' => 'a1b2c3d4-e5f6-4789-a012-345678901234',
'currency' => 'USD'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://flowker.sandbox.lerian.net/v1/workflows/from-template"
payload := strings.NewReader("{\n \"templateId\": \"payment-validation\",\n \"params\": {\n \"executorId\": \"a1b2c3d4-e5f6-4789-a012-345678901234\",\n \"currency\": \"USD\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://flowker.sandbox.lerian.net/v1/workflows/from-template")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"templateId\": \"payment-validation\",\n \"params\": {\n \"executorId\": \"a1b2c3d4-e5f6-4789-a012-345678901234\",\n \"currency\": \"USD\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flowker.sandbox.lerian.net/v1/workflows/from-template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateId\": \"payment-validation\",\n \"params\": {\n \"executorId\": \"a1b2c3d4-e5f6-4789-a012-345678901234\",\n \"currency\": \"USD\"\n }\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2026-03-17T14:30:00Z",
"status": "draft",
"version": "1.0.0",
"workflowId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}{
"code": "FLK-0001",
"message": "Invalid input provided",
"title": "Bad Request"
}{
"code": "FLK-0001",
"message": "Invalid input provided",
"title": "Bad Request"
}{
"code": "FLK-0001",
"message": "Invalid input provided",
"title": "Bad Request"
}{
"code": "FLK-0001",
"message": "Invalid input provided",
"title": "Bad Request"
}Create a Workflow from Template
Use this endpoint to create a new workflow from a catalog template. The template parameters are validated against the template’s JSON Schema. The new workflow is created in draft status.
POST
/
v1
/
workflows
/
from-template
Create a Workflow from Template
curl --request POST \
--url https://flowker.sandbox.lerian.net/v1/workflows/from-template \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"templateId": "payment-validation",
"params": {
"executorId": "a1b2c3d4-e5f6-4789-a012-345678901234",
"currency": "USD"
}
}
'import requests
url = "https://flowker.sandbox.lerian.net/v1/workflows/from-template"
payload = {
"templateId": "payment-validation",
"params": {
"executorId": "a1b2c3d4-e5f6-4789-a012-345678901234",
"currency": "USD"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
templateId: 'payment-validation',
params: {executorId: 'a1b2c3d4-e5f6-4789-a012-345678901234', currency: 'USD'}
})
};
fetch('https://flowker.sandbox.lerian.net/v1/workflows/from-template', 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://flowker.sandbox.lerian.net/v1/workflows/from-template",
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([
'templateId' => 'payment-validation',
'params' => [
'executorId' => 'a1b2c3d4-e5f6-4789-a012-345678901234',
'currency' => 'USD'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://flowker.sandbox.lerian.net/v1/workflows/from-template"
payload := strings.NewReader("{\n \"templateId\": \"payment-validation\",\n \"params\": {\n \"executorId\": \"a1b2c3d4-e5f6-4789-a012-345678901234\",\n \"currency\": \"USD\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://flowker.sandbox.lerian.net/v1/workflows/from-template")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"templateId\": \"payment-validation\",\n \"params\": {\n \"executorId\": \"a1b2c3d4-e5f6-4789-a012-345678901234\",\n \"currency\": \"USD\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://flowker.sandbox.lerian.net/v1/workflows/from-template")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"templateId\": \"payment-validation\",\n \"params\": {\n \"executorId\": \"a1b2c3d4-e5f6-4789-a012-345678901234\",\n \"currency\": \"USD\"\n }\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2026-03-17T14:30:00Z",
"status": "draft",
"version": "1.0.0",
"workflowId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}{
"code": "FLK-0001",
"message": "Invalid input provided",
"title": "Bad Request"
}{
"code": "FLK-0001",
"message": "Invalid input provided",
"title": "Bad Request"
}{
"code": "FLK-0001",
"message": "Invalid input provided",
"title": "Bad Request"
}{
"code": "FLK-0001",
"message": "Invalid input provided",
"title": "Bad Request"
}Authorizations
API key for authenticating requests to the Flowker API. Provisioned via the API_KEY environment variable during deployment.
Body
application/json
Request body containing the template ID and parameters.
Response
Indicates that the resource was successfully created and the operation was completed as expected.
Timestamp when the workflow was created.
Example:
"2026-03-17T14:30:00Z"
Initial status of the workflow (always draft on creation).
Example:
"draft"
Version of the workflow definition.
Example:
"1.0.0"
Unique identifier of the created workflow.
Example:
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Was this page helpful?
⌘I

