{"openapi":"3.1.0","info":{"title":"BureaucraTick Council API","version":"0.6.1","description":"Council-as-a-Service public contracts.\n\n**Auth**\n- People: SpectralHash `POST /v1/auth/spectral/login` → cookie or Bearer session token\n- Machines: `Authorization: Bearer btc_ak_…` (mint under tenant as admin)\n\n**Tenant scoping**\n- Prefer `/v1/tenants/{tid}/…`\n- Optional header `X-BTC-Tenant-Id` on legacy routes\n\n**Webhooks**\n- POST to your URL with `X-BTC-Signature: sha256=<hmac_hex>` over the raw body\n- Events: review.published, review.clarification_required, review.awaiting_chair\n\nSee `docs/external-integration.md` for a full walkthrough.","contact":{"name":"BureaucraTick Council"}},"servers":[{"url":"http://council.bureaucratick.com"}],"tags":[{"name":"Auth","description":"SpectralHash login, password reset, admin principal provisioning, and self-serve signup"},{"name":"Tenants","description":"Workspaces, projects, policy, usage"},{"name":"Reviews","description":"Create and govern council runs"},{"name":"API Keys","description":"Machine credentials"},{"name":"Webhooks","description":"Outbound event delivery"},{"name":"Legacy","description":"Unscoped /v1/council/* (dev)"}],"components":{"securitySchemes":{"SpectralSession":{"type":"http","scheme":"bearer","description":"Session token from login (also set as HttpOnly cookie btc_spectral_session)"},"ApiKey":{"type":"http","scheme":"bearer","description":"Machine key: btc_ak_… from POST /v1/tenants/{tid}/api-keys"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string","description":"e.g. POLICY_DENIED"}}},"CreateReview":{"type":"object","required":["artefact","review_question"],"properties":{"title":{"type":"string"},"artefact":{"type":"object","required":["content"],"properties":{"type":{"type":"string","enum":["text"]},"content":{"type":"string","minLength":3}}},"review_question":{"type":"string"},"council_template":{"type":"string"},"persona_ids":{"type":"array","items":{"type":"string"},"description":"Personas to seat (canonical BT tick ids, e.g. constructiontick). The selected council_template's mandatory_persona_ids (e.g. basemodetick, the neutral control, for public_essay_v1) are always seated in addition to this list; the effective roster is returned as persona_ids on the run. NoBullshiTick is the product display name of constructiontick — nobullshitick is accepted as an alias and resolves to that same persona, not a second seat."},"adapter":{"type":"string","enum":["auto","bt","direct"]},"llm_provider":{"type":"string","enum":["grok","openai","anthropic"]},"wait":{"type":"boolean","default":true,"description":"false = 202 async lifecycle"},"project_id":{"type":"string"},"idempotency_key":{"type":"string","minLength":8,"maxLength":128},"enable_deliberation":{"type":"boolean","default":true},"pause_for_clarification":{"type":"boolean","default":true}}},"Tenant":{"type":"object","properties":{"tenant_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","suspended"]},"policy":{"$ref":"#/components/schemas/TenantPolicy"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"TenantPolicy":{"type":"object","properties":{"allowed_providers":{"type":"array","items":{"type":"string"},"description":"Empty/omit = any provider"},"max_personas":{"type":"integer","minimum":1},"max_deliberation_rounds":{"type":"integer","minimum":1},"require_bt_ticks":{"type":"boolean"}}},"Project":{"type":"object","properties":{"project_id":{"type":"string"},"tenant_id":{"type":"string"},"name":{"type":"string"}}},"ApiKeyPublic":{"type":"object","properties":{"key_id":{"type":"string"},"tenant_id":{"type":"string"},"name":{"type":"string"},"key_prefix":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"created_at":{"type":"string","format":"date-time"}}},"WebhookEndpointPublic":{"type":"object","properties":{"endpoint_id":{"type":"string"},"tenant_id":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["review.published","review.clarification_required","review.awaiting_chair"]}},"enabled":{"type":"boolean"}}},"Usage":{"type":"object","properties":{"tenant_id":{"type":"string"},"reviews_in_store":{"type":"integer"},"by_status":{"type":"object","additionalProperties":{"type":"integer"}},"meter":{"type":"object","properties":{"reviews_created":{"type":"integer"},"reviews_published":{"type":"integer"},"persona_calls":{"type":"integer"},"totals":{"type":"object","additionalProperties":{"type":"integer"}},"by_provider":{"type":"object","additionalProperties":{"type":"integer"}},"structured_output":{"type":"object","description":"Structured-output quality KPI: persona reviews that needed a repair pass or were quarantined after failing schema validation.","properties":{"persona_calls":{"type":"integer"},"repaired":{"type":"integer"},"quarantined":{"type":"integer"},"failure_rate":{"type":"number","description":"quarantined / persona_calls"}}}}}}},"SealStatus":{"type":"object","properties":{"run_id":{"type":"string"},"run_status":{"type":"string"},"verified":{"type":"boolean"},"seal_status":{"type":"string","enum":["verified","invalid","unsigned"]},"algorithm":{"type":"string","nullable":true,"example":"ed25519"},"signed_at":{"type":"string","nullable":true},"report_sha256":{"type":"string","nullable":true},"public_key_fingerprint":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"checked_at":{"type":"string"}}},"ReportExport":{"type":"object","properties":{"tenant_id":{"type":"string"},"run_id":{"type":"string"},"status":{"type":"string"},"report_markdown":{"type":"string","nullable":true},"signed_report":{"type":"object","nullable":true},"seal":{"type":"object"},"chair_decision":{"type":"object","nullable":true},"ratification":{"type":"object","nullable":true}}},"LoginResponse":{"type":"object","properties":{"uid":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"tenantId":{"type":"string"},"spectralHashHex":{"type":"string"},"axes":{"type":"object"},"token":{"type":"string","description":"Bearer session token for non-cookie clients"},"expiresAt":{"type":"string","format":"date-time"}}},"Role":{"type":"string","enum":["viewer","chair","admin","service"]},"ProvisionPrincipal":{"type":"object","required":["userId","email"],"properties":{"userId":{"type":"string","minLength":1,"example":"PARTNER1"},"email":{"type":"string","format":"email"},"accessKey":{"type":"string","minLength":12,"description":"Optional initial access key. Omitted → server generates one. Returned once on 201."},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"},"description":"Omitted or empty → [\"viewer\", \"chair\"]"},"tenant_id":{"type":"string","description":"Omitted → ten_default"},"display_name":{"type":"string"}}},"PrincipalCreated":{"type":"object","properties":{"uid":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"tenant_id":{"type":"string"},"accessKey":{"type":"string","description":"One-time reveal; server stores a hash only"}}},"PrincipalPublic":{"type":"object","properties":{"uid":{"type":"string"},"email":{"type":"string"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}},"tenant_id":{"type":"string"},"enabled":{"type":"boolean"},"last_login_at":{"type":"string","format":"date-time","description":"Omitted until the principal has logged in"},"display_name":{"type":"string"}}},"SignupStatus":{"type":"object","properties":{"enabled":{"type":"boolean","description":"false when mode is off"},"mode":{"type":"string","enum":["open","invite","off"],"description":"COUNCIL_SIGNUP=open|invite|off (default open). Invite is implied when COUNCIL_SIGNUP_INVITE_CODES is set."}}},"SignupRequest":{"type":"object","required":["email","workspace_name"],"properties":{"email":{"type":"string","format":"email"},"display_name":{"type":"string","minLength":1,"maxLength":80},"workspace_name":{"type":"string","minLength":1,"maxLength":80},"invite_code":{"type":"string","maxLength":120,"description":"Required when the server is in invite mode"}}},"SignupResponse":{"type":"object","properties":{"uid":{"type":"string"},"email":{"type":"string"},"accessKey":{"type":"string","description":"Shown once; server stores a hash only"},"tenantId":{"type":"string"},"tenantName":{"type":"string"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"},"description":"Always [\"chair\", \"viewer\"] — never global admin"},"token":{"type":"string","description":"Bearer session token; also set as session cookie"},"expiresAt":{"type":"string","format":"date-time"},"next":{"type":"string","description":"Dashboard path after signup","example":"/dashboard/?welcome=1#view=new"}}},"SignupValidationError":{"type":"object","properties":{"error":{"type":"string","example":"validation_error"},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}}}}}}}},"paths":{"/health":{"get":{"summary":"Health + auth/openapi pointers","responses":{"200":{"description":"OK"}}}},"/v1/openapi.json":{"get":{"summary":"This OpenAPI document","responses":{"200":{"description":"OpenAPI 3.1 JSON"}}}},"/v1/auth/spectral/status":{"get":{"tags":["Auth"],"summary":"Auth feature flags (no secrets)","responses":{"200":{"description":"Status"}}}},"/v1/auth/spectral/login":{"post":{"tags":["Auth"],"summary":"SpectralHash login","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userId","accessKey"],"properties":{"userId":{"type":"string","example":"UID-DEMO"},"accessKey":{"type":"string"}}}}}},"responses":{"200":{"description":"Session issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"401":{"description":"Invalid credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/spectral/session":{"get":{"tags":["Auth"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Current principal","responses":{"200":{"description":"Principal"},"401":{"description":"Not authenticated"}}}},"/v1/auth/spectral/logout":{"post":{"tags":["Auth"],"summary":"Clear session cookie","responses":{"200":{"description":"OK"}}}},"/v1/auth/spectral/password-reset/request":{"post":{"tags":["Auth"],"summary":"Request access-key reset email (no enumeration)","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email"},"userId":{"type":"string"}}}}}},"responses":{"200":{"description":"Always generic success if rate limit OK — SendGrid when account exists"}}}},"/v1/auth/spectral/password-reset/confirm":{"post":{"tags":["Auth"],"summary":"Confirm reset with token + new access key","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token","newAccessKey"],"properties":{"token":{"type":"string"},"newAccessKey":{"type":"string","minLength":12}}}}}},"responses":{"200":{"description":"Key updated"},"400":{"description":"Invalid/expired token"}}}},"/v1/auth/spectral/signup/status":{"get":{"tags":["Auth"],"summary":"Self-serve signup mode (no auth)","description":"Reports whether POST /v1/auth/spectral/signup is accepting new workspaces.","responses":{"200":{"description":"Signup feature flags (no secrets)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupStatus"}}}}}}},"/v1/auth/spectral/signup":{"post":{"tags":["Auth"],"summary":"Self-serve signup (isolated tenant + chair principal)","description":"Creates an isolated tenant, a default project, and a principal with chair+viewer in that tenant (never global admin). Logs the browser in (session cookie + token) and returns the one-time access key. Mode is COUNCIL_SIGNUP=open|invite|off; invite is implied when COUNCIL_SIGNUP_INVITE_CODES is set. Rate-limited per IP (COUNCIL_SIGNUP_PER_HOUR, default 5).","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}}},"responses":{"201":{"description":"Workspace created; access key shown once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupResponse"}}}},"400":{"description":"Auth not enabled (BTC_SESSION_SECRET required), or request validation failed","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Error"},{"$ref":"#/components/schemas/SignupValidationError"}]}}}},"403":{"description":"Signup disabled on this server, or invite mode without a valid invite_code","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Email already registered","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many signups from this address","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/auth/spectral/principals":{"get":{"tags":["Auth"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"List principals (admin)","description":"When auth is enabled, requires an admin role on the session or API key. When auth is disabled, the handler is open (local/dev). Does not return access keys or hashes.","responses":{"200":{"description":"Principal list (no secrets)","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PrincipalPublic"}}}}}}},"403":{"description":"Admin role required (when auth is enabled)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["Auth"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Provision a principal (admin)","description":"Admin provisioning for partner emails. When auth is enabled, requires an admin role. When auth is disabled, the handler is open (local/dev). Returns the access key once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProvisionPrincipal"}}}},"responses":{"201":{"description":"Created; accessKey shown once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrincipalCreated"}}}},"400":{"description":"Validation error, or principal uid / email already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Admin role required (when auth is enabled)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenants":{"get":{"tags":["Tenants"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"List tenants visible to principal","responses":{"200":{"description":"Tenant list"}}},"post":{"tags":["Tenants"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Create tenant (admin)","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"tenant_id":{"type":"string"},"policy":{"$ref":"#/components/schemas/TenantPolicy"}}}}}},"responses":{"201":{"description":"Created with default project"}}}},"/v1/tenants/{tid}":{"get":{"tags":["Tenants"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Tenant detail + projects","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"responses":{"200":{"description":"Tenant"},"404":{"description":"Not found / no access"}}}},"/v1/tenants/{tid}/policy":{"put":{"tags":["Tenants"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Update tenant policy (admin)","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantPolicy"}}}},"responses":{"200":{"description":"Updated tenant"},"403":{"description":"Not admin"}}}},"/v1/tenants/{tid}/projects":{"get":{"tags":["Tenants"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"List projects","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"responses":{"200":{"description":"Projects"}}},"post":{"tags":["Tenants"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Create project","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"project_id":{"type":"string"}}}}}},"responses":{"201":{"description":"Created"}}}},"/v1/tenants/{tid}/usage":{"get":{"tags":["Tenants"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Usage metering + run inventory","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"responses":{"200":{"description":"Usage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}}}}},"/v1/tenants/{tid}/api-keys":{"get":{"tags":["API Keys"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"List API keys (admin; no secrets)","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"responses":{"200":{"description":"Keys","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyPublic"}}}}}}}}},"post":{"tags":["API Keys"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Mint API key (secret returned once)","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["viewer","chair","admin","service"]}},"scopes":{"type":"array","items":{"type":"string"}}}}}}},"responses":{"201":{"description":"Key metadata + one-time secret field"}}}},"/v1/tenants/{tid}/api-keys/{keyId}":{"delete":{"tags":["API Keys"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Revoke API key","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Revoked"}}}},"/v1/tenants/{tid}/webhooks":{"get":{"tags":["Webhooks"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"List webhook endpoints (no secrets)","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"responses":{"200":{"description":"Endpoints + event catalogue","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"string"}},"items":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpointPublic"}}}}}}}}},"post":{"tags":["Webhooks"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Register webhook (HMAC secret once)","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["review.published","review.clarification_required","review.awaiting_chair"]}},"description":{"type":"string"}}}}}},"responses":{"201":{"description":"Endpoint + secret. Verify X-BTC-Signature: sha256=HMAC_SHA256(secret, rawBody)"}}}},"/v1/tenants/{tid}/webhooks/{endpointId}":{"delete":{"tags":["Webhooks"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Delete webhook endpoint","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"},{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted"}}},"patch":{"tags":["Webhooks"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Enable/disable endpoint","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"},{"name":"endpointId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated"}}}},"/v1/tenants/{tid}/webhooks/outbox":{"get":{"tags":["Webhooks"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Recent delivery attempts (admin or chair)","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"responses":{"200":{"description":"Outbox rows"}}}},"/v1/tenants/{tid}/webhooks/outbox/flush":{"post":{"tags":["Webhooks"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Process pending outbox now (admin or chair)","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"responses":{"200":{"description":"{ processed: n }"}}}},"/v1/tenants/{tid}/reviews":{"get":{"tags":["Reviews"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"List reviews for tenant","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"responses":{"200":{"description":"Review summaries"}}},"post":{"tags":["Reviews"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Create review (idempotent with idempotency_key)","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReview"}}}},"responses":{"200":{"description":"Completed (wait=true)"},"202":{"description":"Accepted (wait=false)"},"403":{"description":"Policy denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/tenants/{tid}/reviews/{id}":{"get":{"tags":["Reviews"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Get review (404 if wrong tenant)","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Run"},"404":{"description":"Not found"}}}},"/v1/tenants/{tid}/reviews/{id}/clarifications":{"post":{"tags":["Reviews"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Answer open clarifications","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated"}}}},"/v1/tenants/{tid}/reviews/{id}/decision":{"post":{"tags":["Reviews"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Chair decision (chair|admin)","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["determination","rationale"],"properties":{"determination":{"type":"string","enum":["accept","accept_with_amendments","reject","reopen","select_minority"]},"rationale":{"type":"string"},"chair_notes":{"type":"string"}}}}}},"responses":{"200":{"description":"Decided"}}}},"/v1/tenants/{tid}/reviews/{id}/report":{"get":{"summary":"Export the council report (markdown | html | json)","description":"Markdown is the canonical sealed text. `format=html` returns a self-contained, print-ready page with the seal block and a link to the public verify page (save as PDF from the browser). `format=json` returns markdown + signed_report + seal view.","security":[{"SpectralSession":[]},{"ApiKey":[]}],"parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["markdown","html","json"],"default":"markdown"}}],"responses":{"200":{"description":"Report","content":{"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}},"application/json":{"schema":{"$ref":"#/components/schemas/ReportExport"}}}},"404":{"description":"Unknown run for tenant","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/verify/{run_id}.json":{"get":{"summary":"Public seal verification (no auth)","description":"Confirms whether the run's report is sealed and whether the stored report still matches its Ed25519 signature. Reveals hashes and timestamps only — never artefact or review content. `/verify/{run_id}` (no .json) serves a human-readable page.","security":[],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Seal status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SealStatus"}}}},"404":{"description":"Unknown run"}}}},"/v1/tenants/{tid}/reviews/{id}/verify":{"get":{"tags":["Reviews"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Verify Ed25519 report seal","parameters":[{"name":"tid","in":"path","required":true,"schema":{"type":"string"},"description":"Tenant id (e.g. ten_default)"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Verification result"}}}},"/v1/council/reviews":{"get":{"tags":["Legacy"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Unscoped list (tenant header/query stamps filter)","responses":{"200":{"description":"Items"}}},"post":{"tags":["Legacy"],"security":[{"SpectralSession":[]},{"ApiKey":[]}],"summary":"Unscoped create","responses":{"200":{"description":"Created"}}}}}}