Skip to main content
POST

Authorizations

Authorization
string
header
required

An API key, sent as Authorization: Bearer <key>. Each operation lists the scope its key needs: decisions:evaluate (evaluate and read evaluations), decisions:feedback (your app's feedback) or decisions:develop (everything else, including owner feedback and the review queue). An operation listing no scope takes any scoped key. A key with no scope, or without the operation's, gets 403 INSUFFICIENT_SCOPE.

Headers

idempotency-key
string

Makes a retry safe. For 24 hours, the same key with the same request returns the first stored result (with Idempotent-Replayed: true); the same key with a different request is a 422 IDEMPOTENCY_KEY_REUSED. Keys are scoped to the organization and environment across every operation, so use a fresh key per request. A request that failed before its result was stored runs again when retried with its key.

Required string length: 1 - 255
Pattern: ^[\x20-\x7e]+$
prefer
string

wait=<seconds> (RFC 7240) shortens a single item's 10 s budget; a run ignores it.

Maximum string length: 256

Body

application/json
questions
object
required

System One questions, keyed by name.

result
string
required

The final feature's path, such as aggregations.band.

Required string length: 1 - 80
Examples:

"questions.asks_for_refund"

"aggregations.band"

state
any
required

The content the questions evaluate: any JSON value, including a string or JSON null, as in System One. A question with reads (state.<key> paths, or deeper such as state.order.id) sees only those values, nested as in the state.

moonbounce
object
required
attributes
object

Values your app supplies with each call in attribute_values. The model never sees them.

aggregations
object
model
string

An assertion, not a choice: the decision's engine binding picks the model (set it with POST /v1/decisions/{decision_id}/binding/revisions). Leave it out to use the binding. When sent, every question's bound model must be this one, or the call is a 400 invalid_request with param model, before any engine call and before anything is written: a refused call registers nothing (not even an inline structure seen for the first time, or the binding it would create) and creates no content key. Accepted for System One compatibility.

Required string length: 1 - 128
attribute_values
object

This call's attribute values. Each must match its declaration; a declared one without a default is required.

Response

The evaluation

environment
enum<string>
required

The environment of the key that made the call: production or test. Evaluations, feedback, reviews and suggestions are separate per environment; registered structures are shared.

Available options:
production,
test
id
string
required
Pattern: ^evl_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
answers
object
required

Each question's answer, as System One returns it.

aggregations
object
required
moonbounce
object
required
version
object
required
engines
object
required
usage
object
required
status
enum<string>
required
Available options:
computed
value
number
required
dry_run
any

Must be absent: only a dry run sets dry_run.

via
string

A zero-based rule index, cases.<label> for an exact matched case, or else for the fallback.

cost
object

Always present on fresh responses; absent only on an idempotent replay of a response stored before costs were reported.

calls
object[]
outcome
any

Must be absent: a computed result is a number, with no outcome.

missing
string[]

The questions the result depends on (through result and every aggregation on its path) that have no answer, abstained or failed, as questions.x paths in authored question order. Absent when none is missing; reported for every status. A caller who must not act on partial evidence checks that it is absent, for example status === "decided" && !missing.

A feature's path: questions.<name>, attributes.<name> or aggregations.<name>.

Required string length: 1 - 80