📚 REST API Reference
Direct HTTP API Integration.
No heavy client SDKs required. Integrate automated decisioning directly using standard HTTP/JSON requests in any programming language.
1. Authentication
All REST requests require your secret tenant API key passed via the standard HTTP Bearer token authorization header:
Authorization: Bearer sk_live_v983fna9f3...
2. Execute Decision Endpoint
POST
https://api.wirenode.ai/api/v1/decision
Request Body (JSON)
HTTP 200 OK Response
* Full audit trace stored automatically
3. Ready-To-Use Code Examples
cURL (Terminal)
curl -X POST https://api.wirenode.ai/api/v1/decision \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ruleset": "payment.approval", "context": {"user_id": "usr_94827", "amount": 120.00}}'
Python (requests)
import requests
response = requests.post(
"https://api.wirenode.ai/api/v1/decision",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"ruleset": "payment.approval",
"context": {"user_id": "usr_94827", "amount": 120.00}
}
)
decision = response.json()
print(decision["status"]) # e.g., "APPROVED"
Node.js / JavaScript (fetch)
const response = await fetch("https://api.wirenode.ai/api/v1/decision", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
ruleset: "payment.approval",
context: { user_id: "usr_94827", amount: 120.00 }
})
});
const decision = await response.json();
console.log(decision.status);
4. Response Status Codes
| Status | Description |
|---|---|
| 200 OK | Decision evaluated successfully. Returned status (e.g., APPROVED, REJECTED, FLAG). |
| 401 Unauthorized | Missing or invalid Bearer API Key header. |
| 422 Unprocessable | Missing required field in context JSON or unknown ruleset identifier. |
| 429 Too Many Requests | Monthly API evaluation quota exceeded for your active plan tier. |