{"openapi":"3.1.0","info":{"title":"Blobjot product key API","version":"20261205213641-fd3bbf8","summary":"Read one product’s logic, report runs, stage proposals, and raise questions with a product key.","description":"Blobjot keeps the product logic of software products as typed records. A product key (a secret that starts with `eik_`) reaches one product with one scope and is sent as a Bearer token. Most agents connect over MCP instead, at https://mcp.blobjot.com/mcp, by OAuth sign-in or with the same key; this API is for scripts and pipelines.\n\nErrors are JSON objects with an `error` code, and usually a `message` and a `hint`.","contact":{"name":"Emergent Instruments","url":"https://blobjot.com/docs/"},"termsOfService":"https://blobjot.com/terms"},"externalDocs":{"description":"Keys for helper agents and CI","url":"https://blobjot.com/docs/guides/agent-keys/"},"servers":[{"url":"https://blobjot.com"}],"tags":[{"name":"Read","description":"Needs the read scope."},{"name":"Report","description":"Needs the channels scope."},{"name":"Propose","description":"Needs the propose scope."},{"name":"Write","description":"Needs the write scope."},{"name":"Service"}],"paths":{"/health":{"get":{"operationId":"getHealth","tags":["Service"],"summary":"Whether the service answers","security":[],"responses":{"200":{"description":"The service answers.","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"const":"ok"}}}}}}}}},"/api/orgs/{orgId}/product":{"parameters":[{"name":"orgId","in":"path","required":true,"description":"The id of the organization the key was created in, shown in the product's Connections under Advanced & developer settings.","schema":{"type":"string"}}],"get":{"operationId":"getProduct","tags":["Read"],"summary":"Read every record of the product","description":"The whole product as one JSON object: its revision, a digest, its records, and its proposals, questions, and runs.","security":[{"productKey":["read"]}],"x-required-scope":"read","responses":{"200":{"description":"The product.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/InvalidToken"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/ProductNotFound"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/orgs/{orgId}/product/overview":{"parameters":[{"name":"orgId","in":"path","required":true,"description":"The id of the organization the key was created in, shown in the product's Connections under Advanced & developer settings.","schema":{"type":"string"}}],"get":{"operationId":"getProductOverview","tags":["Read"],"summary":"Read the product’s overview","description":"The product’s details and its capabilities, without their records. Read this first, then one capability at a time.","security":[{"productKey":["read"]}],"x-required-scope":"read","responses":{"200":{"description":"The overview.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/InvalidToken"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/ProductNotFound"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/orgs/{orgId}/product/capabilities/{capabilityId}":{"parameters":[{"name":"orgId","in":"path","required":true,"description":"The id of the organization the key was created in, shown in the product's Connections under Advanced & developer settings.","schema":{"type":"string"}},{"name":"capabilityId","in":"path","required":true,"description":"A capability’s id, from the overview.","schema":{"type":"string"}}],"get":{"operationId":"getProductCapability","tags":["Read"],"summary":"Read one capability and the records it owns","security":[{"productKey":["read"]}],"x-required-scope":"read","responses":{"200":{"description":"The capability with its records.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/InvalidToken"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/ProductNotFound"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/orgs/{orgId}/product/records/lookup":{"parameters":[{"name":"orgId","in":"path","required":true,"description":"The id of the organization the key was created in, shown in the product's Connections under Advanced & developer settings.","schema":{"type":"string"}}],"post":{"operationId":"lookupProductRecords","tags":["Read"],"summary":"Read records by id","security":[{"productKey":["read"]}],"x-required-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["ids"],"properties":{"ids":{"type":"array","minItems":1,"maxItems":50,"items":{"type":"string","minLength":1,"maxLength":200}}}}}}},"responses":{"200":{"description":"The records found.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"401":{"$ref":"#/components/responses/InvalidToken"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/ProductNotFound"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/orgs/{orgId}/product/records/search":{"parameters":[{"name":"orgId","in":"path","required":true,"description":"The id of the organization the key was created in, shown in the product's Connections under Advanced & developer settings.","schema":{"type":"string"}}],"post":{"operationId":"searchProductRecords","tags":["Read"],"summary":"Search the product’s records","security":[{"productKey":["read"]}],"x-required-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["query"],"properties":{"query":{"type":"string","maxLength":200},"kind":{"type":"string","maxLength":40,"description":"Only records of this kind, such as rule or flow."},"capabilityId":{"type":"string","maxLength":200},"limit":{"type":"integer","minimum":1,"maximum":100}}}}}},"responses":{"200":{"description":"The records that match.","content":{"application/json":{"schema":{"type":"object","required":["hits"],"properties":{"hits":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"401":{"$ref":"#/components/responses/InvalidToken"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/ProductNotFound"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/orgs/{orgId}/product/runs":{"parameters":[{"name":"orgId","in":"path","required":true,"description":"The id of the organization the key was created in, shown in the product's Connections under Advanced & developer settings.","schema":{"type":"string"}}],"post":{"operationId":"reportProcessRun","tags":["Report"],"summary":"Report a run","description":"What an agent or pipeline did and what it checked. The run appears in the product’s Runs & audit tab.","security":[{"productKey":["channels"]}],"x-required-scope":"channels","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunReport"}}}},"responses":{"201":{"description":"The run as recorded.","content":{"application/json":{"schema":{"type":"object","required":["run"],"properties":{"run":{"type":"object","additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"401":{"$ref":"#/components/responses/InvalidToken"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/ProductNotFound"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/orgs/{orgId}/product/questions":{"parameters":[{"name":"orgId","in":"path","required":true,"description":"The id of the organization the key was created in, shown in the product's Connections under Advanced & developer settings.","schema":{"type":"string"}}],"post":{"operationId":"raiseProductQuestion","tags":["Propose"],"summary":"Raise a product question for a person to answer","security":[{"productKey":["propose"]}],"x-required-scope":"propose","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Question"}}}},"responses":{"201":{"description":"The question as raised.","content":{"application/json":{"schema":{"type":"object","required":["question"],"properties":{"question":{"type":"object","additionalProperties":true}}}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"401":{"$ref":"#/components/responses/InvalidToken"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/ProductNotFound"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/orgs/{orgId}/product/proposals":{"parameters":[{"name":"orgId","in":"path","required":true,"description":"The id of the organization the key was created in, shown in the product's Connections under Advanced & developer settings.","schema":{"type":"string"}}],"post":{"operationId":"proposeProductChange","tags":["Propose"],"summary":"Stage a change for a person to review","description":"Nothing changes in the product’s logic until a person applies the proposal. Sending the id of a proposal that is still waiting revises it.","security":[{"productKey":["propose"]}],"x-required-scope":"propose","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Proposal"}}}},"responses":{"200":{"description":"The waiting proposal was revised.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"The proposal was staged.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"401":{"$ref":"#/components/responses/InvalidToken"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/ProductNotFound"},"409":{"description":"The proposal named is no longer waiting.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/ValidationFailed"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/orgs/{orgId}/product/records":{"parameters":[{"name":"orgId","in":"path","required":true,"description":"The id of the organization the key was created in, shown in the product's Connections under Advanced & developer settings.","schema":{"type":"string"}}],"post":{"operationId":"updateProduct","tags":["Write"],"summary":"Commit records directly, without review","description":"Every change is checked against the product logic rules before it is saved; a change that fails is not saved.","security":[{"productKey":["write"]}],"x-required-scope":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordChange"}}}},"responses":{"200":{"description":"The change was saved.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/InvalidInput"},"401":{"$ref":"#/components/responses/InvalidToken"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/ProductNotFound"},"422":{"$ref":"#/components/responses/ValidationFailed"},"503":{"$ref":"#/components/responses/Unavailable"}}}}},"security":[{"productKey":["read"]}],"components":{"securitySchemes":{"productKey":{"type":"http","scheme":"bearer","bearerFormat":"Product key (eik_…)","description":"A product key, sent as `Authorization: Bearer eik_…`. It reaches one product with one scope; each scope includes the one before:\n\n- `read`: Read the whole product: overview, capabilities, records, and search.\n- `channels`: Everything in read, plus report runs.\n- `propose`: Everything in channels, plus stage proposals and raise product questions.\n- `write`: Everything in propose, plus commit records directly, decide proposals, and answer and close questions.\n\nEach operation's `security` names the lowest scope it needs. A key with a lower scope gets 403 `insufficient_scope`, with the scope it has and the scope it needs. A person creates and revokes keys in the product's Connections; product keys need a paid plan.","x-scopes":{"read":"Read the whole product: overview, capabilities, records, and search.","channels":"Everything in read, plus report runs.","propose":"Everything in channels, plus stage proposals and raise product questions.","write":"Everything in propose, plus commit records directly, decide proposals, and answer and close questions."}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"A code to branch on, such as insufficient_scope."},"message":{"type":"string","description":"What happened."},"hint":{"type":"string","description":"What to do next."},"granted":{"enum":["read","channels","propose","write"],"description":"With insufficient_scope: the scope the key has."},"required":{"enum":["read","channels","propose","write"],"description":"With insufficient_scope: the scope needed."}},"additionalProperties":true},"RunReport":{"type":"object","additionalProperties":false,"required":["processId","processTitle","status","summary"],"properties":{"runId":{"type":"string","maxLength":120,"description":"The id of a run reported before, to update it."},"processId":{"type":"string","minLength":1,"maxLength":160,"description":"The id of the flow or capability the run belongs to."},"processTitle":{"type":"string","minLength":1,"maxLength":160},"agent":{"type":"string","minLength":1,"maxLength":120},"status":{"enum":["running","completed","blocked","escalated"]},"summary":{"type":"string","minLength":1,"maxLength":600},"rulesChecked":{"type":"array","maxItems":24,"items":{"type":"string","minLength":1,"maxLength":200}},"ruleResults":{"type":"array","maxItems":24,"items":{"type":"object","additionalProperties":false,"required":["ruleId","status"],"properties":{"ruleId":{"type":"string","minLength":1,"maxLength":200},"status":{"enum":["passed","failed","unverified","not_applicable"]},"note":{"type":"string","minLength":1,"maxLength":300}}}},"stepsObserved":{"type":"array","maxItems":40,"items":{"type":"string","minLength":1,"maxLength":200}},"toolsCalled":{"type":"array","maxItems":30,"items":{"type":"string","minLength":1,"maxLength":200}},"sourcesConsulted":{"type":"array","maxItems":24,"items":{"oneOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"location":{"type":"string","minLength":1,"maxLength":400},"section":{"type":"string","minLength":1,"maxLength":120},"version":{"type":"string","minLength":1,"maxLength":120}}}]}},"unmappedEvents":{"type":"array","maxItems":20,"description":"What the run saw that the product does not describe yet.","items":{"type":"object","additionalProperties":false,"required":["label"],"properties":{"label":{"type":"string","minLength":1,"maxLength":140},"detail":{"type":"string","maxLength":400},"suggestedKind":{"enum":["step","rule","system","constant","entity","interface","actor"]}}}},"exceptionNote":{"type":["string","null"],"maxLength":4000}}},"Question":{"type":"object","additionalProperties":false,"description":"A title or the question’s text is required.","anyOf":[{"required":["title"]},{"required":["question"]}],"properties":{"title":{"type":"string","minLength":1,"maxLength":120},"question":{"type":"string","minLength":1,"maxLength":4000},"why":{"type":"string","maxLength":4000},"choices":{"type":"array","maxItems":5,"description":"Prepared answers for the person to pick from.","items":{"type":"object","additionalProperties":false,"required":["label"],"properties":{"label":{"type":"string","minLength":1,"maxLength":140},"effect":{"type":"string","maxLength":300}}}},"intentIds":{"type":"array","maxItems":8,"description":"Ids of the records the question is about.","items":{"type":"string","minLength":1,"maxLength":160}},"forMember":{"type":"string","maxLength":120},"proposalId":{"type":"string","maxLength":120}}},"Proposal":{"type":"object","additionalProperties":false,"required":["title","summary"],"properties":{"proposalId":{"type":"string","minLength":1,"maxLength":120,"description":"The id of a waiting proposal, to revise it."},"title":{"type":"string","minLength":1,"maxLength":120},"summary":{"type":"string","minLength":1,"maxLength":600},"details":{"type":"object","additionalProperties":true,"description":"Changes to the product’s own details."},"records":{"type":"array","description":"Product logic records, in the format the product logic reference describes.","items":{"type":"object","additionalProperties":true}},"patches":{"type":"array","minItems":1,"maxItems":50,"description":"Changes to fields of records the product already has.","items":{"type":"object","additionalProperties":true}},"removedIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"requiredApprovers":{"type":"array","maxItems":10,"items":{"type":"string","minLength":1,"maxLength":120}}}},"RecordChange":{"type":"object","additionalProperties":false,"properties":{"details":{"type":"object","additionalProperties":true,"description":"Changes to the product’s own details."},"records":{"type":"array","description":"Product logic records, in the format the product logic reference describes.","items":{"type":"object","additionalProperties":true}},"patches":{"type":"array","minItems":1,"maxItems":50,"description":"Changes to fields of records the product already has.","items":{"type":"object","additionalProperties":true}},"removedIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"replaceAll":{"type":"boolean","description":"Replace every record with the ones sent."},"summary":{"type":"string","maxLength":400}}}},"responses":{"InvalidInput":{"description":"The request body does not match the schema (`invalid_input`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InvalidToken":{"description":"No key was sent (`sign_in`), or the key is unknown or revoked (`invalid_token`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PaymentRequired":{"description":"The key’s organization is not on a paid plan (`payment_required`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The key’s scope is too low (`insufficient_scope`, with `granted` and `required`), or the address names another organization or product (`access_denied`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ProductNotFound":{"description":"The product, or the record named, does not exist (`product_not_found`, `not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ValidationFailed":{"description":"The change breaks the product logic rules (`validation_failed`); the body lists what failed, and nothing was saved.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"Unavailable":{"description":"The product cannot be reached right now (`product_unavailable`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}