Skip to main content
POST
Register a decision structure

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]+$

Path Parameters

decision_id
string
required
Pattern: ^[a-z][a-z0-9_.-]{0,127}$

Body

application/json

Everything that defines a decision: questions, attribute declarations, aggregations and the result. Names are unique across all three maps.

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"

attributes
object

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

aggregations
object

Response

Already registered

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
decision_id
string
required
Pattern: ^[a-z][a-z0-9_.-]{0,127}$
structure_hash
string
required
Pattern: ^sha256:[0-9a-f]{64}$
question_hashes
object
required

Each question, by name, mapped to its hash (its definition without its name). A question's hash is what feedback about it is stored against.

first_seen_at
string<date-time>
required
created
boolean
required