Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encrata.com/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Workflows let you chain multiple enrichment steps into automated pipelines. Trigger them manually, on a schedule, via webhook, or in response to monitor events.

Key concepts

ConceptDescription
WorkflowA reusable automation with a trigger and a sequence of steps
TriggerWhat starts the workflow: manual, webhook, schedule, file_upload, or monitor_event
StepAn action in the pipeline: lookup, condition, delay, webhook, or transform
RunA single execution of a workflow with input data and step results
SecretEncrypted key-value pair available to webhook steps
TemplatePre-built workflow you can clone and customize

Step types

TypeDescription
email_lookupEnrich an email address
phone_lookupEnrich a phone number
company_lookupEnrich a company
domain_lookupDomain intelligence
ip_lookupIP geolocation & threat data
darkweb_lookupDark web breach search
conditionBranch logic (if/else based on previous step output)
delayWait a specified duration before continuing
webhookSend HTTP request to an external URL
transformTransform/map data between steps

Trigger types

TypeDescription
manualTriggered via API or dashboard button
webhookTriggered by an incoming HTTP POST to a unique ingest URL
scheduleRuns on a cron schedule
file_uploadTriggered when a file is uploaded
monitor_eventTriggered when a monitor detects changes

API Endpoints

All workflow endpoints require JWT authentication (dashboard) or API key authentication.

List Workflows

GET /api/workflows
Query parameters:
ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20)
statusstringFilter by status: active, paused, draft
Example:
curl "https://encrata.com/api/workflows?status=active" \
  -H "Authorization: Bearer YOUR_TOKEN"

Create Workflow

POST /api/workflows
Body:
FieldTypeRequiredDescription
namestringYesWorkflow name
descriptionstringNoHuman-readable description
triggerobjectNoTrigger configuration
stepsarrayNoArray of step objects
template_idstringNoClone from a template
Example:
curl -X POST "https://encrata.com/api/workflows" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Enrich new leads",
    "description": "Look up email, then company, then send to webhook",
    "trigger": { "type": "webhook" },
    "steps": [
      { "id": "step1", "type": "email_lookup", "config": { "field": "email" } },
      { "id": "step2", "type": "company_lookup", "config": { "field": "step1.company" } },
      { "id": "step3", "type": "webhook", "config": { "url": "https://hooks.example.com/new-lead", "method": "POST" } }
    ]
  }'

Get Workflow

GET /api/workflows/{id}
Returns the full workflow definition including trigger, steps, and metadata.

Update Workflow

PUT /api/workflows/{id}
Updates the workflow. A new version is automatically created before the mutation (immutable version history). Body: Same fields as Create.

Delete Workflow

DELETE /api/workflows/{id}
Permanently deletes a workflow and all its run history.

Trigger a Run

POST /api/workflows/{id}/run
Manually trigger a workflow execution. Supports idempotency. Headers:
HeaderDescription
Idempotency-KeyOptional. Prevents duplicate runs if retried.
Body:
FieldTypeDescription
inputobjectInput data passed to the first step
Example:
curl -X POST "https://encrata.com/api/workflows/wf_abc123/run" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Idempotency-Key: unique-key-123" \
  -H "Content-Type: application/json" \
  -d '{ "input": { "email": "jane@company.com" } }'

Version History

GET /api/workflows/{id}/versions
Returns all immutable versions of a workflow (created automatically on each update).

Audit Log

GET /api/workflows/{id}/audit
Returns the audit trail for a workflow (who created, updated, ran it and when).

Webhook Token

GET /api/workflows/{id}/webhook-token
POST /api/workflows/{id}/webhook-token
Get or create a public ingest token. The token enables triggering the workflow via:
POST /api/workflows/ingest/{token}
This public endpoint requires no JWT — anyone with the token can trigger the workflow.

Runs

List All Runs

GET /api/workflows/runs
Query parameters:
ParameterTypeDescription
pageintegerPage number
limitintegerItems per page
workflow_idstringFilter by specific workflow

Get Run Detail

GET /api/workflows/runs/{id}
Returns the run with step-by-step results, timing, and status.

Cancel a Run

POST /api/workflows/runs/{id}/cancel
Cancels a currently executing run.

Delete a Run

DELETE /api/workflows/runs/{id}
Deletes a completed or failed run.

Templates

List Templates

GET /api/workflows/templates
Query parameters:
ParameterTypeDescription
categorystringFilter by category
Returns pre-built workflow templates you can clone using template_id in the Create endpoint.

Secrets

Secrets are encrypted key-value pairs available to webhook steps (e.g., API keys for external services).

List Secrets

GET /api/workflows/secrets
Returns secret names (values are never exposed).

Create Secret

POST /api/workflows/secrets
Body:
FieldTypeRequiredDescription
namestringYesSecret name (used in step config as {{secrets.name}})
valuestringYesSecret value (encrypted at rest)

Delete Secret

DELETE /api/workflows/secrets
Body:
FieldTypeRequiredDescription
namestringYesSecret name to delete

Execution Logs

GET /api/workflows/logs?run_id={run_id}
Returns detailed execution logs for a specific run, including per-step timing and outputs.

Rate Limits

Workflow runs are rate-limited to 60 runs per minute per user. Each run has a retry budget of 3 attempts on transient failures.

Credits

Each enrichment step in a workflow consumes credits at the same rate as the corresponding standalone API call. Non-enrichment steps (condition, delay, webhook, transform) are free.