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.

Scopes

decisions:develop

Path Parameters

decision_id
string
required

A name you choose for this decision, such as refund-exception: a lowercase letter, then up to 127 of a-z 0-9 _ . -. Unique in your organization and shared by its test and production keys. The first registration or evaluation under a new one creates the decision.

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

Body

application/json
kind
enum<string>
required

items: a dataset file, one example per line (JSONL), named later by upload_id in items_from. structure: a decision file or a bare structure, named later by its structure_hash. intake: a planning intake JSON file, named by upload_id when creating an advisory plan.

Available options:
items,
structure,
intake

Response

The upload, waiting for its file

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
upload_id
string
required
Pattern: ^upl_[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
kind
enum<string>
required

items: a dataset file, one example per line (JSONL), named later by upload_id in items_from. structure: a decision file or a bare structure, named later by its structure_hash. intake: a planning intake JSON file, named by upload_id when creating an advisory plan.

Available options:
items,
structure,
intake
url
string
required

Send the file here, once, before expires_at: curl -sS -X PUT --data-binary @<file> <url>. It carries its own authorization (no key), so keep it out of anything shared.

method
enum<string>
required
Available options:
PUT
expires_at
string<date-time>
required

When the URL stops taking the file. Create another upload after that.

max_bytes
integer
required

The most bytes the file may hold.

max_lines
integer

The most lines an items file may hold.