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 the 10 s budget.

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 model setting picks the model (set it with PUT /v1/decisions/{decision_id}/model). Leave it out to use the setting. When sent, every question's model must be this one, or the call is a 400 invalid_request with param model, before any model call and before anything is written: a refused call registers nothing (not even an inline structure seen for the first time, or the setting it would store) 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; decisions and their versions belong to the whole organization.

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

Every aggregation's result. The result's own aggregation carries via when it is bands, rules or match.

moonbounce
object
required

What you sent in moonbounce, echoed. What ran is in version and model.

version
object
required

The version that ran.

model
object
required

The model that answered.

cost
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.

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