Developer Documentation
Build with Rulyflow
Everything you need to integrate rule evaluation into your applications. From REST APIs to webhooks, deploy decision logic anywhere.
REST API
Ingest data and consume structured results via a simple REST interface.
Learn moreWebhooks
Receive real-time notifications when rules trigger or evaluations complete.
Learn moreStructured Results
Get typed responses with risk triggers, approvals, and classification data.
Learn moreDeployment
Deploy on-premise or in the cloud with Docker, Kubernetes, or serverless.
Learn moreAuthentication
API keys, OAuth 2.0, and scoped tokens for secure integration.
Learn moreGuides
Step-by-step tutorials for common integration patterns.
Learn moreAuthentication
All API requests require an API key passed in the Authorization header. You can generate keys from the Rulyflow dashboard under Settings → API Keys.
curl -X POST https://api.rulyflow.com/v1/evaluate \
-H "Authorization: Bearer rf_live_abc123..." \
-H "Content-Type: application/json"Quick Start
Install the SDK and evaluate your first rule in under a minute.
Install the SDK
npm install @rulyflow/sdkInitialize the client
import { Rulyflow } from "@rulyflow/sdk";
const rulyflow = new Rulyflow({
apiKey: process.env.RULYFLOW_API_KEY,
});Evaluate a rule
const result = await rulyflow.evaluate({
ruleId: "loan-approval",
data: {
creditScore: 720,
loanAmount: 250_000,
annualIncome: 85_000,
},
});
console.log(result.decision); // "approved"
console.log(result.trace); // [{ node, passed, ... }]POST /v1/evaluate
Evaluate a rule against a data payload. Returns a structured decision with a full execution trace.
Request Body
ruleIdstringrequiredThe unique identifier of the rule to evaluate
dataobjectrequiredKey-value payload matching the rule's input schema
options.dryRunbooleanRun without persisting results
options.versionstringPin to a specific rule version
Response
decisionstringrequired"approved" | "denied" | "review"
scorenumberrequiredConfidence or risk score (0–100)
tracearrayrequiredOrdered list of nodes with pass/fail status
metadataobjectrequiredRule version, evaluation time, etc.
{
"decision": "approved",
"score": 82,
"trace": [
{ "node": "credit-check", "passed": true, "value": 720 },
{ "node": "dti-ratio", "passed": true, "value": 0.24 },
{ "node": "loan-cap", "passed": true, "value": 250000 }
],
"metadata": {
"ruleVersion": "3.1.0",
"evaluatedAt": "2025-11-14T09:32:01Z",
"durationMs": 12
}
}Webhooks
Register webhook endpoints to receive real-time notifications. Rulyflow signs every payload with HMAC-SHA256 so you can verify authenticity.
{
"event": "evaluation.completed",
"ruleId": "loan-approval",
"decision": "approved",
"evaluationId": "eval_8f3k2...",
"timestamp": "2025-11-14T09:32:01Z"
}Signature Verification
Compare the X-Rulyflow-Signature header against the HMAC-SHA256 digest of the raw request body using your webhook secret.
Rate Limits
API rate limits depend on your plan tier. Limits are applied per API key and reset every 60 seconds.
| Plan | Requests/min | Burst |
|---|---|---|
| Free | 60 | 10 |
| Pro | 600 | 100 |
| Enterprise | Unlimited | Custom |