API reference
Lots
Tamper-evident records: a chain of events for a project, its history, and verifying the chain.
- Operations
- 28
- Base path
https://os.one.ml/api/v1/lots- Scopes
lots:readlots:reviewlots:write- API keys
- —
- SDK
genesis.call('lots_erase_tasks_get', …)· helpers undergenesis.lots- CLI
genesis lots- MCP
- 20 tools; the other 8 through
genesis_call
Operations
Erase tasks
An erase task and its read-back evidence
GET/v1/lots/erase-tasks/{task}
Scope lots:read at the gateway, and then Lots decides: the caller needs lots:admin, or must be a person in their own session who is the task's requester or erased subject, or who presents the receipt from their own self erase. Everyone else, including an API key or agent with only lots:read, gets the same 404 as an unknown id. evidence appears only when state is done.
Parameters
taskpath · stringrequiredreceiptquery · stringThe
receiptfrom your own self erase. It works only with your own person session, in the same org and environment. A query string can reach request logs, so send it only to read this task.
Responses
- 200The task
Response fields
task_idstringrequiredsubject_idstringrequiredbasis"self" | "org_admin"requiredstatestringrequiredevidenceobjectupdated_atstring (date-time)required
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/erase-tasks/$TASK" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_erase_tasks_get', {
task: '<task>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "lots_erase_tasks_get",
"arguments": {
"task": "<task>"
}
}
}
}Event kinds
The event kinds a caller may append, with their schemas
GET/v1/lots/event-kinds
Scope lots:read.
Responses
- 200The kinds
Response fields
kindsobjectrequired
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/event-kinds" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_event_kinds'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_event_kinds",
"arguments": {}
}
}Projects
Projects you hold a role on, newest first
GET/v1/lots/projects
Scope lots:read. Page with cursor.
Parameters
cursorquery · stringlimitquery · integer
Responses
- 200A page of projects
Response fields
projectsobject[]requiredprojects[].[].project_idstringrequiredpattern
^prj_[A-Za-z0-9]{16,40}$projects[].[].name_commitstringrequiredpattern
^[0-9a-f]{64}$projects[].[].name_file_idstring | nullprojects[].[].env"sandbox" | "live"requiredprojects[].[].created_atstring (date-time)projects[].[].headobjectrequiredprojects[].[].head.seqintegerrequiredmin 0
projects[].[].head.event_sha256stringrequiredpattern
^[0-9a-f]{64}$cursorstring | nullrequired
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_projects_list'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_projects_list",
"arguments": {}
}
}Create a project (a new chain)
POST/v1/lots/projects
Scope lots:write. The chain starts with a project.created event at seq 1.
Request body application/json
name_commitstringrequiredpattern
^[0-9a-f]{64}$name_file_idstring | nullThe Boxes file that holds the words (lots.body.v1). pattern
^[A-Za-z0-9_-]{1,128}$
Responses
- 201The new project
Response fields
project_idstringrequiredpattern
^prj_[A-Za-z0-9]{16,40}$name_commitstringrequiredpattern
^[0-9a-f]{64}$name_file_idstring | nullenv"sandbox" | "live"requiredcreated_atstring (date-time)headobjectrequiredhead.seqintegerrequiredmin 0
head.event_sha256stringrequiredpattern
^[0-9a-f]{64}$
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 413Body or payload over its cap (
BODY_TOO_LARGE,PAYLOAD_TOO_LARGE) - 429Tenant-minute cap reached, or too many open exports (
TOO_MANY_EXPORTS); seeretry-afterorretry_after_s - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/lots/projects" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name_commit": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_projects_create', {
body: {
name_commit: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_projects_create",
"arguments": {
"body": {
"name_commit": "string"
}
}
}
}A project and its chain head
GET/v1/lots/projects/{project}
Scope lots:read.
Parameters
projectpath · stringrequired
Responses
- 200The project
Response fields
project_idstringrequiredpattern
^prj_[A-Za-z0-9]{16,40}$name_commitstringrequiredpattern
^[0-9a-f]{64}$name_file_idstring | nullenv"sandbox" | "live"requiredcreated_atstring (date-time)headobjectrequiredhead.seqintegerrequiredmin 0
head.event_sha256stringrequiredpattern
^[0-9a-f]{64}$
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_projects_get', {
project: '<project>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_projects_get",
"arguments": {
"project": "<project>"
}
}
}Blueprints
Blueprints in this project, newest first (head version only)
GET/v1/lots/projects/{project}/blueprints
Scope lots:read and any project role. Filter by lot; page with cursor.
Parameters
projectpath · stringrequiredlotquery · stringcursorquery · stringo1.<seq>from an earlier pagelimitquery · integer
Responses
- 200A page of blueprints
Response fields
itemsobject[]requireditems[].[].kind"intent" | "blueprint"requireditems[].[].idstringrequireditems[].[].lot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$items[].[].versionintegerrequiredmin 1
items[].[].version_sha256stringrequiredpattern
^[0-9a-f]{64}$items[].[].prev_version_sha256string | nullitems[].[].body_file_idstring | nullitems[].[].objectobjectitems[].[].event_seqintegeritems[].[].created_atstring (date-time)cursorstring | nullrequired
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT/blueprints" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_blueprints_list', {
project: '<project>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_blueprints_list",
"arguments": {
"project": "<project>"
}
}
}Create a blueprint at version 1
POST/v1/lots/projects/{project}/blueprints
Scope lots:write and editor or admin on the project. It belongs to the lot of the intent version it names. Lots stores commitments and Boxes file ids only, never the words.
Parameters
projectpath · stringrequired
Request body application/json
intent_version_sha256stringrequiredpattern
^[0-9a-f]{64}$title_commitstringrequiredpattern
^[0-9a-f]{64}$sectionsobject[]requiredsections[].[].idstringrequiredpattern
^[a-z][a-z0-9_-]{0,63}$sections[].[].commitstringrequiredpattern
^[0-9a-f]{64}$refsobjectrefs.rulesobject[]refs.rules[].[].idstringrequiredpattern
^[A-Za-z0-9_:.-]{1,128}$refs.rules[].[].version_sha256stringrequiredpattern
^[0-9a-f]{64}$refs.codeobject[]refs.code[].[].repostringrequiredpattern
^[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}$refs.code[].[].pathstringrequiredpattern
^[A-Za-z0-9_./-]{1,1000}$refs.code[].[].commitstringrequiredpattern
^[0-9a-f]{40}$bodyobject | null
Responses
- 201The new blueprint version
Response fields
kind"intent" | "blueprint"requiredidstringrequiredlot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$versionintegerrequiredmin 1
version_sha256stringrequiredpattern
^[0-9a-f]{64}$prev_version_sha256string | nullbody_file_idstring | nullobjectobjectevent_seqintegercreated_atstring (date-time)
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 413Body or payload over its cap (
BODY_TOO_LARGE,PAYLOAD_TOO_LARGE) - 429Tenant-minute cap reached, or too many open exports (
TOO_MANY_EXPORTS); seeretry-afterorretry_after_s - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/lots/projects/$PROJECT/blueprints" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"intent_version_sha256": "string",
"title_commit": "string",
"sections": [
{
"id": "string",
"commit": "string"
}
]
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_blueprints_create', {
project: '<project>',
body: {
intent_version_sha256: 'string',
title_commit: 'string',
sections: [
{
id: 'string',
commit: 'string',
},
],
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_blueprints_create",
"arguments": {
"project": "<project>",
"body": {
"intent_version_sha256": "string",
"title_commit": "string",
"sections": [
{
"id": "string",
"commit": "string"
}
]
}
}
}
}A blueprint with every version and its reviews
GET/v1/lots/projects/{project}/blueprints/{blueprint}
Scope lots:read and any project role.
Parameters
projectpath · stringrequiredblueprintpath · stringrequired
Responses
- 200The blueprint
Response fields
kind"intent" | "blueprint"requiredidstringrequiredlot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$headobjectrequiredhead.versionintegerrequiredhead.version_sha256stringrequiredpattern
^[0-9a-f]{64}$versionsobject[]requiredversions[].[].kind"intent" | "blueprint"requiredversions[].[].idstringrequiredversions[].[].lot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$versions[].[].versionintegerrequiredmin 1
versions[].[].version_sha256stringrequiredpattern
^[0-9a-f]{64}$versions[].[].prev_version_sha256string | nullversions[].[].body_file_idstring | nullversions[].[].objectobjectversions[].[].event_seqintegerversions[].[].created_atstring (date-time)reviewsobject[]requiredreviews[].[].schemastringrequiredreviews[].[].subjectobjectrequiredreviews[].[].statusstringrequiredreviews[].[].verdictstring | nullreviews[].[].review_sha256stringrequiredpattern
^[0-9a-f]{64}$reviews[].[].event_seqintegerrequiredreviews[].[].recorded_atstring (date-time)required
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT/blueprints/$BLUEPRINT" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_blueprints_get', {
project: '<project>',
blueprint: '<blueprint>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_blueprints_get",
"arguments": {
"project": "<project>",
"blueprint": "<blueprint>"
}
}
}Add the next blueprint version
POST/v1/lots/projects/{project}/blueprints/{blueprint}/versions
Scope lots:write and editor or admin. Name the version you edited in prev_version_sha256; if another edit landed first the answer is 409 STALE_VERSION.
Parameters
projectpath · stringrequiredblueprintpath · stringrequired
Request body application/json
prev_version_sha256stringrequiredpattern
^[0-9a-f]{64}$intent_version_sha256stringrequiredpattern
^[0-9a-f]{64}$title_commitstringrequiredpattern
^[0-9a-f]{64}$sectionsobject[]requiredsections[].[].idstringrequiredpattern
^[a-z][a-z0-9_-]{0,63}$sections[].[].commitstringrequiredpattern
^[0-9a-f]{64}$refsobjectrefs.rulesobject[]refs.rules[].[].idstringrequiredpattern
^[A-Za-z0-9_:.-]{1,128}$refs.rules[].[].version_sha256stringrequiredpattern
^[0-9a-f]{64}$refs.codeobject[]refs.code[].[].repostringrequiredpattern
^[A-Za-z0-9_.-]{1,100}/[A-Za-z0-9_.-]{1,100}$refs.code[].[].pathstringrequiredpattern
^[A-Za-z0-9_./-]{1,1000}$refs.code[].[].commitstringrequiredpattern
^[0-9a-f]{40}$bodyobject | null
Responses
- 201The new blueprint version
Response fields
kind"intent" | "blueprint"requiredidstringrequiredlot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$versionintegerrequiredmin 1
version_sha256stringrequiredpattern
^[0-9a-f]{64}$prev_version_sha256string | nullbody_file_idstring | nullobjectobjectevent_seqintegercreated_atstring (date-time)
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 409Conflict (
QUORUM_REQUIRED,STALE_VERSION) - 413Body or payload over its cap (
BODY_TOO_LARGE,PAYLOAD_TOO_LARGE) - 429Tenant-minute cap reached, or too many open exports (
TOO_MANY_EXPORTS); seeretry-afterorretry_after_s - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/lots/projects/$PROJECT/blueprints/$BLUEPRINT/versions" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"intent_version_sha256": "string",
"title_commit": "string",
"sections": [
{
"id": "string",
"commit": "string"
}
],
"prev_version_sha256": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_blueprints_add_version', {
project: '<project>',
blueprint: '<blueprint>',
body: {
intent_version_sha256: 'string',
title_commit: 'string',
sections: [
{
id: 'string',
commit: 'string',
},
],
prev_version_sha256: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_blueprints_add_version",
"arguments": {
"project": "<project>",
"blueprint": "<blueprint>",
"body": {
"intent_version_sha256": "string",
"title_commit": "string",
"sections": [
{
"id": "string",
"commit": "string"
}
],
"prev_version_sha256": "string"
}
}
}
}Chain:verify
Recompute the project's hash chain
GET/v1/lots/projects/{project}/chain:verify
Scope lots:read. ok false names the first failing seq and why.
Parameters
projectpath · stringrequired
Responses
- 200The verification result
Response fields
okbooleanrequiredseqintegerrequiredhead_sha256stringrequiredfailed_at_seqintegerreasonstring
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT/chain:verify" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_chain_verify', {
project: '<project>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_chain_verify",
"arguments": {
"project": "<project>"
}
}
}Events
A page of the project's events after a cursor, oldest first
GET/v1/lots/projects/{project}/events
Scope lots:read. Pass the returned cursor back for the next page; more is true when the page is full.
Parameters
projectpath · stringrequiredcursorquery · stringc1.<seq>from an earlier page; omit to start at the beginninglimitquery · integer
Responses
- 200A page of events
Response fields
eventsobject[]requiredevents[].[].seqintegerrequiredmin 1
events[].[].kindstringrequiredevents[].[].subjectobject | nullrequiredevents[].[].actorobjectrequiredevents[].[].actor.subject_idstringrequiredpattern
^sub_[0-9a-f]{32}$events[].[].actor.commitstringrequiredpattern
^[0-9a-f]{64}$events[].[].atstring (date-time)requiredevents[].[].payloadobjectrequiredevents[].[].payload_sha256stringrequiredpattern
^[0-9a-f]{64}$events[].[].prev_sha256stringrequiredpattern
^[0-9a-f]{64}$events[].[].event_sha256stringrequiredpattern
^[0-9a-f]{64}$cursorstringrequiredmorebooleanrequired
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT/events" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_events_list', {
project: '<project>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_events_list",
"arguments": {
"project": "<project>"
}
}
}Append an event to the project's chain
POST/v1/lots/projects/{project}/events
Scope lots:write. The actor is the verified caller (as a subject id and commitment), never taken from the body. Reserved kinds are refused (400 INVALID_KIND). One writer per chain: concurrent appends queue and stay gapless. Payloads are capped per event and per tenant-minute (413, 429).
Parameters
projectpath · stringrequired
Request body application/json
kindstringrequiredpattern
^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*){1,3}$subjectobject | nullpayloadobject
Responses
- 201The appended event
Response fields
seqintegerrequiredmin 1
kindstringrequiredsubjectobject | nullrequiredactorobjectrequiredactor.subject_idstringrequiredpattern
^sub_[0-9a-f]{32}$actor.commitstringrequiredpattern
^[0-9a-f]{64}$atstring (date-time)requiredpayloadobjectrequiredpayload_sha256stringrequiredpattern
^[0-9a-f]{64}$prev_sha256stringrequiredpattern
^[0-9a-f]{64}$event_sha256stringrequiredpattern
^[0-9a-f]{64}$cursorstringrequired
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 413Body or payload over its cap (
BODY_TOO_LARGE,PAYLOAD_TOO_LARGE) - 429Tenant-minute cap reached, or too many open exports (
TOO_MANY_EXPORTS); seeretry-afterorretry_after_s - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/lots/projects/$PROJECT/events" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"kind": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_events_append', {
project: '<project>',
body: {
kind: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_events_append",
"arguments": {
"project": "<project>",
"body": {
"kind": "string"
}
}
}
}Events:wait
Long-poll for events after a cursor (up to 60 s)
GET/v1/lots/projects/{project}/events:wait
Scope lots:read. Returns as soon as there is at least one event after cursor, or an empty page when timeout_s passes.
Parameters
projectpath · stringrequiredcursorquery · stringc1.<seq>from an earlier page; omit to start at the beginninglimitquery · integertimeout_squery · integer
Responses
- 200A page of events (possibly empty)
Response fields
eventsobject[]requiredevents[].[].seqintegerrequiredmin 1
events[].[].kindstringrequiredevents[].[].subjectobject | nullrequiredevents[].[].actorobjectrequiredevents[].[].actor.subject_idstringrequiredpattern
^sub_[0-9a-f]{32}$events[].[].actor.commitstringrequiredpattern
^[0-9a-f]{64}$events[].[].atstring (date-time)requiredevents[].[].payloadobjectrequiredevents[].[].payload_sha256stringrequiredpattern
^[0-9a-f]{64}$events[].[].prev_sha256stringrequiredpattern
^[0-9a-f]{64}$events[].[].event_sha256stringrequiredpattern
^[0-9a-f]{64}$cursorstringrequiredmorebooleanrequired
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT/events:wait" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_events_wait', {
project: '<project>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_events_wait",
"arguments": {
"project": "<project>"
}
}
}Export
Export a project's record (rule 11)
GET/v1/lots/projects/{project}/export
Scope lots:read and any role on the project; the role is checked again on every page. Sections in order: events, versions, reviews, then grants for a project admin or a lots:admin caller who has a role. The first page fixes as_of, so later writes do not appear; follow cursor until done. Lots keeps commitments and Boxes file ids, never body text or project names (bodies: boxes), so a full export also needs the Boxes export of those files. Events re-hash to as_of offline by the lots_chain_verify rule. At most 4 open exports per tenant per instance, else 429 TOO_MANY_EXPORTS. Not in the factory MCP profile.
Parameters
projectpath · stringrequiredcursorquery · stringThe
cursorfrom the previous export page; omit to start
Responses
- 200One page of the export
Response fields
format"lots.export.v1"requiredproject_idstringrequiredpattern
^prj_[A-Za-z0-9]{16,40}$envstringrequiredas_ofobjectrequiredas_of.seqintegerrequiredmin 0
as_of.event_sha256stringrequiredpattern
^[0-9a-f]{64}$section"events" | "versions" | "reviews" | "grants"requiredrowsobject[]requiredcursorstring | nullrequireddonebooleanrequiredprojectobjectFirst page only
project.name_commitstringrequiredproject.name_file_idstring | nullproject.created_atstring (date-time)requiredbodies"boxes"First page only. The words stay in Boxes.
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 429Tenant-minute cap reached, or too many open exports (
TOO_MANY_EXPORTS); seeretry-afterorretry_after_s - 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT/export" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_projects_export', {
project: '<project>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "lots_projects_export",
"arguments": {
"project": "<project>"
}
}
}
}Grants
Who holds a role on this project
GET/v1/lots/projects/{project}/grants
Scope lots:read and project admin, or lots:admin for an org admin recovering a project.
Parameters
projectpath · stringrequired
Responses
- 200The grants
Response fields
grantsobject[]requiredgrants[].[].subject_idstringrequiredpattern
^sub_[0-9a-f]{32}$grants[].[].role"viewer" | "reviewer" | "editor" | "signer" | "release_signer" | "admin"required
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT/grants" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_grants_list', {
project: '<project>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "lots_grants_list",
"arguments": {
"project": "<project>"
}
}
}
}Give a subject a role on this project
PUT/v1/lots/projects/{project}/grants/{subject}
Scope lots:write and project admin, or lots:admin. Recorded on the chain. Not an MCP tool, so a model cannot change who has access.
Parameters
projectpath · stringrequiredsubjectpath · stringrequired
Request body application/json
role"viewer" | "reviewer" | "editor" | "signer" | "release_signer" | "admin"required
Responses
- 200The grant
Response fields
subject_idstringrequiredpattern
^sub_[0-9a-f]{32}$role"viewer" | "reviewer" | "editor" | "signer" | "release_signer" | "admin" | nullrequiredchangedbooleanrequiredseqinteger
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 409Conflict (
QUORUM_REQUIRED,STALE_VERSION) - 413Body or payload over its cap (
BODY_TOO_LARGE,PAYLOAD_TOO_LARGE) - 429Tenant-minute cap reached, or too many open exports (
TOO_MANY_EXPORTS); seeretry-afterorretry_after_s - 4xx 5xxThe error envelope.
curl -X PUT "https://os.one.ml/api/v1/lots/projects/$PROJECT/grants/$SUBJECT" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"role": "viewer"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_grants_set', {
project: '<project>',
subject: '<subject>',
body: {
role: 'viewer',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "lots_grants_set",
"arguments": {
"project": "<project>",
"subject": "<subject>",
"body": {
"role": "viewer"
}
}
}
}
}Remove a subject from this project
DELETE/v1/lots/projects/{project}/grants/{subject}
Scope lots:write and project admin, or lots:admin. Recorded on the chain. Not an MCP tool.
Parameters
projectpath · stringrequiredsubjectpath · stringrequired
Responses
- 200The grant, now null
Response fields
subject_idstringrequiredpattern
^sub_[0-9a-f]{32}$role"viewer" | "reviewer" | "editor" | "signer" | "release_signer" | "admin" | nullrequiredchangedbooleanrequiredseqinteger
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 409Conflict (
QUORUM_REQUIRED,STALE_VERSION) - 429Tenant-minute cap reached, or too many open exports (
TOO_MANY_EXPORTS); seeretry-afterorretry_after_s - 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/lots/projects/$PROJECT/grants/$SUBJECT" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_grants_delete', {
project: '<project>',
subject: '<subject>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "lots_grants_delete",
"arguments": {
"project": "<project>",
"subject": "<subject>"
}
}
}
}Intents
Intents in this project, newest first (head version only)
GET/v1/lots/projects/{project}/intents
Scope lots:read and any project role. Filter by lot; page with cursor.
Parameters
projectpath · stringrequiredlotquery · stringcursorquery · stringo1.<seq>from an earlier pagelimitquery · integer
Responses
- 200A page of intents
Response fields
itemsobject[]requireditems[].[].kind"intent" | "blueprint"requireditems[].[].idstringrequireditems[].[].lot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$items[].[].versionintegerrequiredmin 1
items[].[].version_sha256stringrequiredpattern
^[0-9a-f]{64}$items[].[].prev_version_sha256string | nullitems[].[].body_file_idstring | nullitems[].[].objectobjectitems[].[].event_seqintegeritems[].[].created_atstring (date-time)cursorstring | nullrequired
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT/intents" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_intents_list', {
project: '<project>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_intents_list",
"arguments": {
"project": "<project>"
}
}
}Create an intent at version 1
POST/v1/lots/projects/{project}/intents
Scope lots:write and editor or admin on the project. An intent opens a new lot (LOT-n). Lots stores commitments and Boxes file ids only, never the words.
Parameters
projectpath · stringrequired
Request body application/json
title_commitstringrequiredpattern
^[0-9a-f]{64}$behavioursobject[]behaviours[].[].idstringrequiredpattern
^[a-z][a-z0-9_-]{0,63}$behaviours[].[].commitstringrequiredpattern
^[0-9a-f]{64}$sourceobjectsource.kind"person" | "import" | "rules" | "agent"default
"person"source.rule_refsobject[]source.rule_refs[].[].idstringrequiredpattern
^[A-Za-z0-9_:.-]{1,128}$source.rule_refs[].[].version_sha256stringrequiredpattern
^[0-9a-f]{64}$bodyobject | null
Responses
- 201The new intent version
Response fields
kind"intent" | "blueprint"requiredidstringrequiredlot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$versionintegerrequiredmin 1
version_sha256stringrequiredpattern
^[0-9a-f]{64}$prev_version_sha256string | nullbody_file_idstring | nullobjectobjectevent_seqintegercreated_atstring (date-time)
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 413Body or payload over its cap (
BODY_TOO_LARGE,PAYLOAD_TOO_LARGE) - 429Tenant-minute cap reached, or too many open exports (
TOO_MANY_EXPORTS); seeretry-afterorretry_after_s - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/lots/projects/$PROJECT/intents" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title_commit": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_intents_create', {
project: '<project>',
body: {
title_commit: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_intents_create",
"arguments": {
"project": "<project>",
"body": {
"title_commit": "string"
}
}
}
}A intent with every version and its reviews
GET/v1/lots/projects/{project}/intents/{intent}
Scope lots:read and any project role.
Parameters
projectpath · stringrequiredintentpath · stringrequired
Responses
- 200The intent
Response fields
kind"intent" | "blueprint"requiredidstringrequiredlot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$headobjectrequiredhead.versionintegerrequiredhead.version_sha256stringrequiredpattern
^[0-9a-f]{64}$versionsobject[]requiredversions[].[].kind"intent" | "blueprint"requiredversions[].[].idstringrequiredversions[].[].lot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$versions[].[].versionintegerrequiredmin 1
versions[].[].version_sha256stringrequiredpattern
^[0-9a-f]{64}$versions[].[].prev_version_sha256string | nullversions[].[].body_file_idstring | nullversions[].[].objectobjectversions[].[].event_seqintegerversions[].[].created_atstring (date-time)reviewsobject[]requiredreviews[].[].schemastringrequiredreviews[].[].subjectobjectrequiredreviews[].[].statusstringrequiredreviews[].[].verdictstring | nullreviews[].[].review_sha256stringrequiredpattern
^[0-9a-f]{64}$reviews[].[].event_seqintegerrequiredreviews[].[].recorded_atstring (date-time)required
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT/intents/$INTENT" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_intents_get', {
project: '<project>',
intent: '<intent>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_intents_get",
"arguments": {
"project": "<project>",
"intent": "<intent>"
}
}
}Add the next intent version
POST/v1/lots/projects/{project}/intents/{intent}/versions
Scope lots:write and editor or admin. Name the version you edited in prev_version_sha256; if another edit landed first the answer is 409 STALE_VERSION.
Parameters
projectpath · stringrequiredintentpath · stringrequired
Request body application/json
prev_version_sha256stringrequiredpattern
^[0-9a-f]{64}$title_commitstringrequiredpattern
^[0-9a-f]{64}$behavioursobject[]behaviours[].[].idstringrequiredpattern
^[a-z][a-z0-9_-]{0,63}$behaviours[].[].commitstringrequiredpattern
^[0-9a-f]{64}$sourceobjectsource.kind"person" | "import" | "rules" | "agent"default
"person"source.rule_refsobject[]source.rule_refs[].[].idstringrequiredpattern
^[A-Za-z0-9_:.-]{1,128}$source.rule_refs[].[].version_sha256stringrequiredpattern
^[0-9a-f]{64}$bodyobject | null
Responses
- 201The new intent version
Response fields
kind"intent" | "blueprint"requiredidstringrequiredlot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$versionintegerrequiredmin 1
version_sha256stringrequiredpattern
^[0-9a-f]{64}$prev_version_sha256string | nullbody_file_idstring | nullobjectobjectevent_seqintegercreated_atstring (date-time)
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 409Conflict (
QUORUM_REQUIRED,STALE_VERSION) - 413Body or payload over its cap (
BODY_TOO_LARGE,PAYLOAD_TOO_LARGE) - 429Tenant-minute cap reached, or too many open exports (
TOO_MANY_EXPORTS); seeretry-afterorretry_after_s - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/lots/projects/$PROJECT/intents/$INTENT/versions" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title_commit": "string",
"prev_version_sha256": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_intents_add_version', {
project: '<project>',
intent: '<intent>',
body: {
title_commit: 'string',
prev_version_sha256: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_intents_add_version",
"arguments": {
"project": "<project>",
"intent": "<intent>",
"body": {
"title_commit": "string",
"prev_version_sha256": "string"
}
}
}
}Lots
One lot: its intent, blueprints and reviews
GET/v1/lots/projects/{project}/lots/{lot}
Scope lots:read and any project role. At most 50 objects; truncated says when there are more. gaps names the stages not recorded yet.
Parameters
projectpath · stringrequiredlotpath · stringrequired
Responses
- 200The lot
Response fields
lot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$project_idstringrequiredpattern
^prj_[A-Za-z0-9]{16,40}$intentobject | nullrequiredblueprintsobject[]requiredblueprints[].[].kind"intent" | "blueprint"requiredblueprints[].[].idstringrequiredblueprints[].[].lot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$blueprints[].[].headobjectrequiredblueprints[].[].head.versionintegerrequiredblueprints[].[].head.version_sha256stringrequiredpattern
^[0-9a-f]{64}$blueprints[].[].versionsobject[]requiredblueprints[].[].versions[].[].kind"intent" | "blueprint"requiredblueprints[].[].versions[].[].idstringrequiredblueprints[].[].versions[].[].lot_nostringrequiredpattern
^LOT-[1-9][0-9]{0,11}$blueprints[].[].versions[].[].versionintegerrequiredmin 1
blueprints[].[].versions[].[].version_sha256stringrequiredpattern
^[0-9a-f]{64}$blueprints[].[].versions[].[].prev_version_sha256string | nullblueprints[].[].versions[].[].body_file_idstring | nullblueprints[].[].versions[].[].objectobjectblueprints[].[].versions[].[].event_seqintegerblueprints[].[].versions[].[].created_atstring (date-time)blueprints[].[].reviewsobject[]requiredblueprints[].[].reviews[].[].schemastringrequiredblueprints[].[].reviews[].[].subjectobjectrequiredblueprints[].[].reviews[].[].statusstringrequiredblueprints[].[].reviews[].[].verdictstring | nullblueprints[].[].reviews[].[].review_sha256stringrequiredpattern
^[0-9a-f]{64}$blueprints[].[].reviews[].[].event_seqintegerrequiredblueprints[].[].reviews[].[].recorded_atstring (date-time)requiredtruncatedbooleanrequiredgapsstring[]required
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT/lots/$LOT" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_lot_get', {
project: '<project>',
lot: '<lot>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_lot_get",
"arguments": {
"project": "<project>",
"lot": "<lot>"
}
}
}Reviews
The AI reviews of one version
GET/v1/lots/projects/{project}/reviews
Scope lots:read and any project role. subject is the version hash.
Parameters
projectpath · stringrequiredsubjectquery · stringrequired
Responses
- 200The reviews
Response fields
reviewsobject[]requiredreviews[].[].schemastringrequiredreviews[].[].subjectobjectrequiredreviews[].[].statusstringrequiredreviews[].[].verdictstring | nullreviews[].[].review_sha256stringrequiredpattern
^[0-9a-f]{64}$reviews[].[].event_seqintegerrequiredreviews[].[].recorded_atstring (date-time)required
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/projects/$PROJECT/reviews?subject=$SUBJECT" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_reviews_list', {
project: '<project>',
subject: '<subject>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_reviews_list",
"arguments": {
"project": "<project>",
"subject": "<subject>"
}
}
}Record an AI review (`factory.review.v1`)
POST/v1/lots/projects/{project}/reviews
Scope lots:review (lots:write and lots:admin also satisfy it) and project role reviewer, editor or admin. lots:review opens no other route. Lots re-derives review_sha256 and the verdict from the findings; a review is advice and never signs anything. Recording the same review again answers 200 with created: false. Not an MCP tool: the review job posts these.
Parameters
projectpath · stringrequired
Request body application/json
schema"factory.review.v1"requiredsubjectobjectrequiredsubject.kind"intent" | "blueprint"requiredsubject.version_sha256stringrequiredpattern
^[0-9a-f]{64}$reviewerobjectrequiredreviewer.modelstringrequiredreviewer.served_modelstring | nullreviewer.familystring | nullreviewer.foundry_request_idstring | nullreviewer.rubric_skill_sha256stringrequiredpattern
^[0-9a-f]{64}$status"ok" | "failed"requiredfailurestring | nullverdict"pass" | "concerns" | "block" | nullfindingsobject[]findings[].[].idstring | nullfindings[].[].severity"block" | "concern" | "info"requiredfindings[].[].locatorobjectfindings[].[].locator.sectionstring | nullfindings[].[].locator.lineinteger | nullfindings[].[].text_commitstring | nullsummary_commitstring | nulltext_file_idstring | nullreview_sha256stringpattern
^[0-9a-f]{64}$cost_refobject | nullcost_ref.receipt_idstring | nullcost_ref.cost_sourcestring | null
Responses
- 200This review was already recorded (
created: false)Response fields
review_sha256stringrequiredpattern
^[0-9a-f]{64}$createdbooleanrequiredevent_seqinteger
- 201The review was recorded
Response fields
review_sha256stringrequiredpattern
^[0-9a-f]{64}$createdbooleanrequiredevent_seqinteger
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 413Body or payload over its cap (
BODY_TOO_LARGE,PAYLOAD_TOO_LARGE) - 429Tenant-minute cap reached, or too many open exports (
TOO_MANY_EXPORTS); seeretry-afterorretry_after_s - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/lots/projects/$PROJECT/reviews" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"schema": "factory.review.v1",
"subject": {
"kind": "intent",
"version_sha256": "string"
},
"reviewer": {
"model": "string",
"rubric_skill_sha256": "string"
},
"status": "ok"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_reviews_record', {
project: '<project>',
body: {
schema: 'factory.review.v1',
subject: {
kind: 'intent',
version_sha256: 'string',
},
reviewer: {
model: 'string',
rubric_skill_sha256: 'string',
},
status: 'ok',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "lots_reviews_record",
"arguments": {
"project": "<project>",
"body": {
"schema": "factory.review.v1",
"subject": {
"kind": "intent",
"version_sha256": "string"
},
"reviewer": {
"model": "string",
"rubric_skill_sha256": "string"
},
"status": "ok"
}
}
}
}
}Subjects
Erase a subject (rule 11)
POST/v1/lots/subjects/{subject}:erase
A person erases their own subject from their own session; an API key, agent token or other delegated caller naming its own subject gets 403 DELEGATED_CALLER. Erasing another member's subject needs lots:admin, and once that subject has sign-offs it is 409 QUORUM_REQUIRED. Starts a durable erase task (key destroyed, vault row removed, every table scanned, every touched chain re-verified); read it with lots_erase_tasks_get. A self erase also returns receipt, once and only here: afterwards the person has no subject, and the receipt is how they read their proof. Not in the factory MCP profile (a person does this in their own session).
Parameters
subjectpath · stringrequired
Responses
- 202The erase task
Response fields
task_idstringrequiredpattern
^era_[0-9a-f]{32}$statestringrequiredevidenceobjectreceiptstringSelf erase only, returned once. Keep it to read this task later with
lots_erase_tasks_get.
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 409Conflict (
QUORUM_REQUIRED,STALE_VERSION) - 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/lots/subjects/$SUBJECT:erase" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_subjects_erase', {
subject: '<subject>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "lots_subjects_erase",
"arguments": {
"subject": "<subject>"
}
}
}
}The caller's own subject id and commitment (created on first use)
GET/v1/lots/subjects/me
Scope lots:read.
Responses
- 200The caller's subject
Response fields
subject_idstringrequiredpattern
^sub_[0-9a-f]{32}$commitstringrequiredpattern
^[0-9a-f]{64}$
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/subjects/me" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_subjects_me'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_subjects_me",
"arguments": {}
}
}Export what Lots keeps about you (rule 11)
GET/v1/lots/subjects/me/export
Scope lots:read, from the person's own session only; an API key, agent token or other delegated caller gets 403 DELEGATED_CALLER. Never creates a subject: with none, or after an erase, it is 404. Sections in order: subject (without the salt), grants, erase_tasks (codes and a count), acted_events (an index with no payloads). Follow cursor until done. Not in the factory MCP profile (a person does this in their own session).
Parameters
cursorquery · stringThe
cursorfrom the previous export page; omit to start
Responses
- 200One page of the export
Response fields
format"lots.export.v1"requiredenvstringrequiredsubject_idstringrequiredpattern
^sub_[0-9a-f]{32}$section"subject" | "grants" | "erase_tasks" | "acted_events"requiredrowsobject[]requiredcursorstring | nullrequireddonebooleanrequired
- 400Invalid request (
INVALID_JSON,INVALID_NAME,INVALID_KIND,INVALID_PAYLOAD,INVALID_SUBJECT,INVALID_CURSOR,INVALID_FIELD,UNKNOWN_FIELD,DUPLICATE_ID,INVALID_LOT,VERDICT_MISMATCH,REVIEW_HASH_MISMATCH) - 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 404Not found in this tenant
- 429Tenant-minute cap reached, or too many open exports (
TOO_MANY_EXPORTS); seeretry-afterorretry_after_s - 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/subjects/me/export" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_subjects_me_export'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "genesis_call",
"arguments": {
"operation": "lots_subjects_me_export",
"arguments": {}
}
}
}Usage
This tenant's month-to-date events and bytes, and its caps
GET/v1/lots/usage
Scope lots:read.
Responses
- 200Usage
Response fields
envstringrequiredmonth_to_dateobjectrequiredmonth_to_date.eventsintegermonth_to_date.bytesintegercapsobjectrequiredcaps.events_per_minuteintegercaps.bytes_per_minuteintegercaps.payload_max_bytesinteger
- 401No verified identity
- 403Missing scope (
FORBIDDEN, withneed), or a delegated caller on a person's own route (DELEGATED_CALLER) - 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/lots/usage" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('lots_usage'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "lots_usage",
"arguments": {}
}
}L1fe AI Inc. · Built from Genesis 0.3.1 and the live gateway on 2026-10-25. Support