Skip to main content
POST
Record or revise facts; the whole batch is validated before any of it is written.

Authorizations

Authorization
string
header
required

An API key issued with object_model scopes: Authorization: Bearer sk_…. The scopes: object_model:records:read, object_model:records:write, object_model:facts:read, object_model:facts:write, object_model:model:read, object_model:model:configure, object_model:actions:run, object_model:changes:read. An operation's security lists the scopes it needs; several entries mean any one of them will do. A person field (ref(user), ref_list(user)) holds a user id: look people up by email or id with GET /v1/users, outside this API, with a key that also has users:read.

Scopes

object_model:facts:write

Headers

Idempotency-Key
string
required

Required on every write: one key per logical write, sent again unchanged on every retry. A finished request replays its answer for 24 hours; the same key on a different request is refused (409 idempotency_key_reused). A dry run (dry_run: true) needs none, and is not recorded under one it carries.

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

Body

application/json
assertions
object[]

The facts to record or revise. The whole list is checked before any of it is written.

capture
object

Decide a value VectorShift captured from a document or conversation and holds for review. Sent alone, without assertions.

declare_worlds
object[]

Scenarios to create or rename before the facts land, so a fact can name a scenario made in the same request. PUT /worlds/{world_id} sends one.

drop_worlds
string[]

Scenarios to drop, with every fact recorded in them. DELETE /worlds/{world_id} sends one.

idempotency_key
string

Taken from the Idempotency-Key header: leave it out.

patch
boolean

Revise facts by sending only what changes: what a revision leaves out keeps its current value. Without it, a revision restates the whole fact, and what it leaves out is cleared.

withdraw
object[]

Scenario overrides to remove, so the parent's value shows through again. POST /facts/withdraw takes them as its body.

Response

Answered.

capture_state
string

For a capture: PENDING, APPROVED, REJECTED or STALE.

fact_ids
string[]

Each assertion's fact_id, in the order sent: keep them to revise the facts, or to override them in a scenario.

invalidated_definitions
string[]

Figures whose values this write changes, by id: read them again for their new values.

withdrawn

How many overrides were removed. 0 for a fact with no override in that scenario, which is not an error.

worlds_dropped

How many scenarios were dropped.

written

How many facts were recorded.