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"
}Criar um workflow a partir de modelo
Utilize este endpoint para criar um novo workflow a partir de um modelo do catálogo. Os parâmetros do modelo são validados contra o JSON Schema do modelo. O novo workflow é criado com status draft.
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"
}Autorizações
Chave de API para autenticar as requisições à API do Flowker. Provisionada por meio da variável de ambiente API_KEY durante o deployment.
Corpo
Corpo da solicitação contendo o ID do modelo e os parâmetros.
Resposta
Indica que o recurso foi criado com sucesso e a operação foi concluída conforme esperado.
Marca temporal de quando o workflow foi criado.
"2026-03-17T14:30:00Z"
Status inicial do workflow (sempre draft na criação).
"draft"
Versão da definição do workflow.
"1.0.0"
Identificador único do workflow criado.
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Esta página foi útil?

