Skip to main content
POST
Import labeled examples

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
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"

examples
object[]
required
Required array length: 1 - 200 elements
attributes
object

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

aggregations
object
structure_hash
any

Must be absent: send the structure inline or by its hash, not both.

Response

Imported

run_id
string
required

Pass it to loss_report; kept until expires_at. A stored run's evaluations stay after it expires.

Pattern: ^evr_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
expires_at
string<date-time>
required
dry_run
boolean
required

Whether the items were dry runs (nothing stored) or stored as evaluations.

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}$
version
object
required
counts
object
required
cost
object
required
results
object[]
required

One per example, in order. A failed example stored nothing: send it again in a new call.