Create Workflow
curl --request POST \
--url https://encrata.com/api/workflows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"trigger": {},
"steps": [
{}
],
"template_id": "<string>"
}
'import requests
url = "https://encrata.com/api/workflows"
payload = {
"name": "<string>",
"description": "<string>",
"trigger": {},
"steps": [{}],
"template_id": "<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>',
description: '<string>',
trigger: {},
steps: [{}],
template_id: '<string>'
})
};
fetch('https://encrata.com/api/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://encrata.com/api/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>',
'description' => '<string>',
'trigger' => [
],
'steps' => [
[
]
],
'template_id' => '<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://encrata.com/api/workflows"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"trigger\": {},\n \"steps\": [\n {}\n ],\n \"template_id\": \"<string>\"\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://encrata.com/api/workflows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"trigger\": {},\n \"steps\": [\n {}\n ],\n \"template_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://encrata.com/api/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 \"description\": \"<string>\",\n \"trigger\": {},\n \"steps\": [\n {}\n ],\n \"template_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyWorkflows
Create Workflow
Create a new automation workflow with triggers and steps.
POST
/
api
/
workflows
Create Workflow
curl --request POST \
--url https://encrata.com/api/workflows \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"trigger": {},
"steps": [
{}
],
"template_id": "<string>"
}
'import requests
url = "https://encrata.com/api/workflows"
payload = {
"name": "<string>",
"description": "<string>",
"trigger": {},
"steps": [{}],
"template_id": "<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>',
description: '<string>',
trigger: {},
steps: [{}],
template_id: '<string>'
})
};
fetch('https://encrata.com/api/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://encrata.com/api/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>',
'description' => '<string>',
'trigger' => [
],
'steps' => [
[
]
],
'template_id' => '<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://encrata.com/api/workflows"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"trigger\": {},\n \"steps\": [\n {}\n ],\n \"template_id\": \"<string>\"\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://encrata.com/api/workflows")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"trigger\": {},\n \"steps\": [\n {}\n ],\n \"template_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://encrata.com/api/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 \"description\": \"<string>\",\n \"trigger\": {},\n \"steps\": [\n {}\n ],\n \"template_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthentication
Requires a JWT token or API key in theAuthorization header.
Authorization: Bearer YOUR_TOKEN
Request
Workflow display name.
Human-readable description of what the workflow does.
Trigger configuration. Types:
manual, webhook, schedule, file_upload, monitor_event.Array of step objects. Each step has
id, type, and config.Clone from an existing template instead of defining steps manually.
Step types
| Type | Description |
|---|---|
email_lookup | Enrich an email address |
phone_lookup | Enrich a phone number |
company_lookup | Enrich a company |
domain_lookup | Domain intelligence |
ip_lookup | IP geolocation & threat data |
darkweb_lookup | Dark web breach search |
condition | Branch logic (if/else) |
delay | Wait before continuing |
webhook | Send HTTP request |
transform | Transform data between steps |
Example request
curl -X POST "https://encrata.com/api/workflows" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Lead enrichment pipeline",
"trigger": { "type": "webhook" },
"steps": [
{ "id": "step1", "type": "email_lookup", "config": { "field": "email" } },
{ "id": "step2", "type": "condition", "config": { "expression": "step1.company != null" } },
{ "id": "step3", "type": "company_lookup", "config": { "field": "step1.company" } },
{ "id": "step4", "type": "webhook", "config": { "url": "https://hooks.example.com/enriched", "method": "POST" } }
]
}'
import requests
resp = requests.post(
"https://encrata.com/api/workflows",
headers={"Authorization": "Bearer YOUR_TOKEN"},
json={
"name": "Lead enrichment pipeline",
"trigger": {"type": "webhook"},
"steps": [
{"id": "step1", "type": "email_lookup", "config": {"field": "email"}},
{"id": "step2", "type": "company_lookup", "config": {"field": "step1.company"}},
],
},
)
print(resp.json())
Response
Returns the created workflow object.{
"id": "wf_abc123",
"name": "Lead enrichment pipeline",
"status": "active",
"trigger": { "type": "webhook" },
"steps": [...],
"webhook_url": "https://encrata.com/api/workflows/ingest/tok_xyz789",
"created_at": "2026-06-01T10:00:00Z"
}
⌘I