📚 Developer Docs

Integration Guide.

Welcome to the AI Workflow Engine API documentation. Our engine provides an ultra-fast REST API for computing deterministic rules, fraud evaluation, and pricing dynamically. Integrating takes less than 5 minutes.

1. Authentication

All API requests require a Bearer token in the Authorization header. You can generate an API key from your User Cabinet.

Authorization: Bearer sk_live_v983fna9f3...

2. Request a Workflow

To evaluate a contextual rule (e.g., verifying a payment or checking account eligibility), send a `POST` request to the workflow endpoint.

POST https://api.workflowengine.io/v1/workflow

Request Payload

{
  "workflow": "payment.approval",
  "context": {
    "user_id": "usr_94827",
    "amount": 100.50,
    "currency": "USD",
    "ip_address": "192.168.1.1"
  }
}
Field Type Description
workflow string The identifier of the rule matrix you want to trigger.
context object A key-value dictionary of dynamic signals evaluated by the engine.

Response Payload

The API responds `< 100ms` with the executed decision state and all triggered reason codes.

{
  "workflow": "payment.approval",
  "status": "APPROVED",
  "reason_codes": [
    "risk_score_very_low",
    "device_reputation_good"
  ],
  "execution_ms": 14,
  "trace_id": "trc_89f0a1xyz"
}

3. Client SDKs

Node.js

npm install @decision/sdk

Python

pip install workflow-engine

PHP

composer require decisionhq/sdk