API Reference
https://api.onoperator.com/v2
All requests require an Authorization: Bearer <key> header. Generate keys from Settings → API Keys.
Rules
GET
/rules
List all rules
Returns a paginated list of all rules in the workspace.
| Param | Type | Required | Description |
|---|---|---|---|
page | integer | Optional | Default 1 |
limit | integer | Optional | Max 100, default 20 |
POST
/rules
Create a rule
Creates a deterministic rule attachable to workflow stages.
| Param | Type | Required | Description |
|---|---|---|---|
name | string | Required | Unique rule identifier |
condition.field | string | Required | Dot-path to entity field |
condition.operator | string | Required | eq, neq, gte, lte, in, contains, regex |
condition.value | any | Required | Comparison value |
on_pass | string | Optional | Default: advance_stage |
on_fail | string | Optional | Default: reject_with_reason |
// Response 201
{ "id": "rl_01J2...", "name": "minimum_experience_check", "status": "active" }
DEL
/rules/{rule_id}
Delete a rule
Permanently deletes a rule. Cannot delete rules attached to active workflow stages.
Workflows
POST
/evaluate
Evaluate an entity
Submits an entity for real-time rule evaluation. Returns result, advanced stage, and any triggered actions.
// Request body
{ "workflow_id": "wf_01J2...", "entity": { "applicant": { "verified_years": 5 } } }
// Response 200
{ "result": "passed", "stage_advanced_to": "Quoting", "processing_ms": 14 }
Payments
POST
/payments/trigger
Trigger staged payment
Manually triggers a payment stage within a workflow. Requires a linked payment method on the entity.
GET
/payments/{payment_id}
Get payment status
Returns current state: pending, processing, settled, or failed.
Events & Webhooks
GET
/events
Fetch event log
Paginated event log. Filter by event type, date range, and workflow_id.
POST
/webhooks
Register webhook endpoint
Registers a URL to receive signed real-time event notifications. Operator signs each delivery with your webhook secret via HMAC-SHA256.
| Param | Type | Required | Description |
|---|---|---|---|
url | string | Required | HTTPS endpoint |
events | array | Required | Event types to subscribe |
secret | string | Optional | HMAC signing secret |