{"components":{"securitySchemes":{"everythingKey":{"bearerFormat":"64 hex characters","description":"One operator-issued key. Scopes are values of the form <product>:<verb> (bah:read, bah:mint, bah:agent); a key carries exactly the scopes it was issued with. Revoking a key is instant; there is no un-revoke. See https://boundedagentharness.com/api for how keys are issued.","scheme":"bearer","type":"http"}}},"info":{"description":"The operator tier of the BAH API: account-level reads and the two writes (minting access codes, messaging a workspace's agent), driven by one everything-key. Human-readable front door: https://boundedagentharness.com/api. Agents working INSIDE workspaces use MCP instead: POST https://boundedagentharness.com/mcp (discovery document: https://boundedagentharness.com/.well-known/bah-agent.json, plain-text map: https://boundedagentharness.com/llms.txt). Every call to this API is written to the public usage ledger before it runs.","title":"Bounded Agent Harness — Operator API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/api/op/bah/account":{"get":{"description":"Existence and lifecycle only (created, confirmed, last sign-in) — never message content, never other people's data. Scope: bah:read.","parameters":[{"in":"query","name":"email","required":true,"schema":{"format":"email","type":"string"}}],"responses":{"200":{"description":"OK — { ok, email, exists, created_at, email_confirmed_at, last_sign_in_at }"},"400":{"description":"email-required"},"401":{"description":"Missing, unknown, or revoked key."},"403":{"description":"The key lacks the bah:read scope."}},"summary":"Does an account exist for this email, and where is it in its life?"}},"/api/op/bah/entitlement":{"get":{"description":"Paid access, the tier and its source, and when it expires. Scope: bah:read.","parameters":[{"in":"query","name":"email","required":true,"schema":{"format":"email","type":"string"}}],"responses":{"200":{"description":"OK — { ok, email, paidAccess, tier, source, expires }"},"400":{"description":"email-required"},"401":{"description":"Missing, unknown, or revoked key."},"403":{"description":"The key lacks the bah:read scope."}},"summary":"What access does this email hold right now?"}},"/api/op/bah/health":{"get":{"description":"Any valid everything-key. Returns the key's label and scopes, the serving deploy, and the time.","responses":{"200":{"description":"OK — { ok, service, key: { label, scopes }, deploy, time }"},"401":{"description":"Missing, unknown, or revoked key (one shape for all three)."}},"summary":"Is the API up, and whose key is this?"}},"/api/op/bah/inbox":{"get":{"description":"Scope: bah:read. Oldest first, cap 100.","parameters":[{"in":"query","name":"workspace_id","required":true,"schema":{"format":"uuid","type":"string"}},{"description":"open = not done yet; unclaimed = nobody has picked it up; all = everything.","in":"query","name":"state","required":false,"schema":{"default":"open","enum":["open","unclaimed","all"],"type":"string"}}],"responses":{"200":{"description":"OK — { ok, workspace_id, state, messages }"},"400":{"description":"workspace_id-required"},"401":{"description":"Missing, unknown, or revoked key."},"403":{"description":"The key lacks the bah:read scope."}},"summary":"Read a workspace's agent inbox (the messages + their states)."},"post":{"description":"Scope: bah:agent. The message lands in the workspace's inbox and in its Record; the agent sees it over MCP (bah_inbox_list), claims it (bah_inbox_claim), and its work appears in the room. The author recorded is the calling key's label — never a field in the body.","requestBody":{"content":{"application/json":{"schema":{"properties":{"body":{"maxLength":4000,"type":"string"},"workspace_id":{"format":"uuid","type":"string"}},"required":["workspace_id","body"],"type":"object"}}},"required":true},"responses":{"201":{"description":"Posted — { ok, message }"},"400":{"description":"workspace_id-required / empty-message / message-too-long / bad-json"},"401":{"description":"Missing, unknown, or revoked key."},"403":{"description":"The key lacks the bah:agent scope."},"404":{"description":"workspace-not-found"}},"summary":"Leave a message for a workspace's agent."}},"/api/op/bah/mint":{"post":{"description":"The only money-adjacent write in v1. Scope: bah:mint. The returned code is shown once, in this response.","requestBody":{"content":{"application/json":{"schema":{"properties":{"email":{"description":"Required for family=trial.","format":"email","type":"string"},"expires_days":{"description":"Optional, family=reviewer: code lifetime in days (default 30).","maximum":3650,"minimum":1,"type":"integer"},"family":{"description":"trial binds the code to an email; reviewer is an unbound day-pass-style code.","enum":["trial","reviewer"],"type":"string"},"name":{"description":"Optional, family=trial: the recipient's name for the delivery email.","type":"string"}},"required":["family"],"type":"object"}}},"required":true},"responses":{"201":{"description":"Minted — { ok, code, family, tier, expires_at, email }"},"400":{"description":"bad-family / email-required / …"},"401":{"description":"Missing, unknown, or revoked key."},"403":{"description":"The key lacks the bah:mint scope."}},"summary":"Mint an access code (trial or reviewer family)."}},"/api/op/bah/usage":{"get":{"parameters":[{"description":"Look-back window in days (1–90).","in":"query","name":"days","required":false,"schema":{"default":30,"maximum":90,"type":"integer"}}],"responses":{"200":{"description":"OK — { ok, days, totals, by_surface, by_day }"},"401":{"description":"Missing, unknown, or revoked key."},"403":{"description":"The key lacks the bah:read scope."}},"summary":"The usage ledger — the same numbers the public /usage page shows."}}},"security":[{"everythingKey":[]}],"servers":[{"url":"https://boundedagentharness.com"}]}