{"openapi":"3.1.0","info":{"title":"RegCore API","summary":"Production API for Canadian regulatory search, change monitoring, and cited AI answers.","description":"<div class=\"rc-hero\">\n  <div class=\"rc-hero__eyebrow\">RegCore API</div>\n  <h1>Compliance intelligence, ready for production workflows.</h1>\n  <p>Query the regulator record, monitor change, and retrieve partner-safe trace evidence through a clean authenticated API.</p>\n  <div class=\"rc-hero__actions\">\n    <a href=\"#tag/chat\" class=\"rc-btn rc-btn--primary\">Start with chat</a>\n    <a href=\"#tag/traces\" class=\"rc-btn rc-btn--secondary\">Review trace evidence</a>\n    <a href=\"#tag/regintel\" class=\"rc-btn rc-btn--secondary\">Inspect change feed</a>\n  </div>\n</div>\n\n<div class=\"rc-cards rc-cards--compact\">\n  <div class=\"rc-card\">\n    <div class=\"rc-card__eyebrow\">Cited answers</div>\n    <div class=\"rc-card__title\">Ask regulatory questions</div>\n    <p><code>POST /regintel/chat</code> returns governed answers, optional structured output, citations, and an authenticated trace id.</p>\n  </div>\n  <div class=\"rc-card\">\n    <div class=\"rc-card__eyebrow\">Evidence trail</div>\n    <div class=\"rc-card__title\">Review what RegCore did</div>\n    <p><code>GET /traces/{trace_id}</code> returns a non-technical decision trail for the authenticated user.</p>\n  </div>\n  <div class=\"rc-card\">\n    <div class=\"rc-card__eyebrow\">Regulatory change</div>\n    <div class=\"rc-card__title\">Track what changed</div>\n    <p><code>POST /tools/changes</code> returns new and revised materials from a timestamp cursor.</p>\n  </div>\n</div>\n\n## How partners use this API\n\n1. Ask a question with <code>/regintel/chat</code> and store the returned <code>trace_id</code>.\n2. Retrieve trace evidence with <code>/traces/{trace_id}</code> when a reviewer needs to understand how the answer was prepared.\n3. Use <code>/tools/changes</code> for incremental regulatory monitoring.\n4. Connect an agent runtime to <code>/RegCore tool interface</code> when you want the same governed RegCore capabilities available inside Claude, Cowork, or another RegCore tool interface-compatible assistant.\n\n## Agent runtime integration via RegCore tool interface\n\nRegCore exposes a partner-safe RegCore tool interface endpoint for agent runtimes that support remote tools. Use it when your existing assistant should discover RegCore capabilities at runtime instead of calling individual REST routes directly.\n\n- Endpoint: <code>https://api.regcore.ai/RegCore tool interface</code>\n- Transport: streamable HTTP\n- Auth: send the same partner credential as <code>X-API-Key</code> or <code>Authorization: Bearer</code>\n- Compatible clients: Claude, Cowork, and custom RegCore tool interface clients that support authenticated HTTP transports\n- Scope: only partner-facing tools and schemas are advertised; storage, retrieval, ranking, and orchestration internals are not part of the public contract\n\nExample runtime configuration:\n\n```json\n{\n  \"servers\": {\n    \"regcore\": {\n      \"url\": \"https://api.regcore.ai/RegCore tool interface\",\n      \"headers\": {\n        \"Authorization\": \"Bearer ${REGCORE_API_KEY}\"\n      }\n    }\n  }\n}\n```\n\n## Authentication\n\nSend one credential on every protected request:\n\n```http\nX-API-Key: regcore_your_key_here\n```\n\nBearer auth is also supported for clients that standardize on `Authorization` headers.\n\n```http\nAuthorization: Bearer regcore_your_key_here\n```\n\nPublic endpoints: <code>GET /scalar</code> and <code>GET /openapi.json</code>.\n\n## Production contract\n\n- OpenAPI 3.1 schema\n- RFC 9457 problem responses\n- <code>x-request-id</code> and <code>x-audit-id</code> response headers\n- Authenticated trace IDs for frontend trace retrieval\n- Partner support: <a href=\"mailto:partners@regcore.ai\">partners@regcore.ai</a>","contact":{"name":"RegCore.AI Partners","url":"https://regcore.ai/","email":"partners@regcore.ai"},"license":{"name":"Proprietary","url":"https://regcore.ai/terms"},"version":"2.0.0","x-logo":{"url":"https://api.regcore.ai/logo.svg","altText":"RegCore.AI","backgroundColor":"transparent","href":"https://regcore.ai"}},"servers":[{"url":"https://api.regcore.ai","description":"Production"}],"paths":{"/regintel/stats":{"get":{"tags":["meta"],"summary":"Partner-safe corpus coverage statistics","description":"Returns high-level RegCore coverage metrics for partner dashboards: document totals, document-type coverage, jurisdiction/entity counts, and recent change volume for the requested lookback window. Storage details are not exposed.","operationId":"meta.stats","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"description":"Lookback window for recent changes, in days.","default":30,"title":"Days"},"description":"Lookback window for recent changes, in days."},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"X-Forwarded-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Meta.Stats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/tools/changes":{"post":{"tags":["regintel"],"summary":"List regulatory document changes since a date","description":"Returns a deterministic feed of newly published or revised regulatory documents from the requested date. Use change_types to include new documents, content updates, or both. When keywords are provided, RegCore searches only within the changed documents and orders matching changes by document relevance. No LLM is used.","operationId":"tools.changes","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"X-Forwarded-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangesSpec"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeFeedV1"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/regintel/chat":{"post":{"tags":["chat"],"summary":"Ask a regulatory question","description":"Returns a clean partner envelope: markdown answer, optional structured payload, optional full citations, optional reasoning steps, optional governance receipt, and a RegCore trace id when available.","operationId":"chat.create","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"X-Forwarded-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Chat response"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/regintel/chat/stream":{"post":{"tags":["chat"],"summary":"Ask the compliance agent with live progress (SSE)","description":"Same request shape as `/chat`, but responds with a `text/event-stream` of reasoning steps and answer chunks so a UI can render live progress. Event types: `step_started`, `step_completed`, `answer_chunk`, `final`, `error`. The `final` frame carries the full Chat response envelope.","operationId":"chat.stream","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"X-Forwarded-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-User-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}},"responses":{"200":{"description":"SSE stream of reasoning + answer.","content":{"application/json":{"schema":{}},"text/event-stream":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/regintel/chat/templates":{"get":{"tags":["chat"],"summary":"List available structured-output templates","operationId":"chat.templates.list","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"X-Forwarded-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Chat.Templates.List"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces":{"get":{"tags":["traces"],"summary":"List all traces for the authenticated user","operationId":"traces.list","parameters":[{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"X-Forwarded-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/traces/{trace_id}":{"get":{"tags":["traces"],"summary":"Get full trace data as JSON","operationId":"traces.get","parameters":[{"name":"trace_id","in":"path","required":true,"schema":{"type":"string","title":"Trace Id"}},{"name":"X-Internal-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Key"}},{"name":"X-Forwarded-User-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Forwarded-User-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AgentInfo":{"properties":{"name":{"type":"string","title":"Name"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},"additionalProperties":false,"type":"object","required":["name"],"title":"AgentInfo"},"ChangeFeedDiagnostics":{"properties":{"query_rows":{"type":"integer","title":"Query Rows","description":"Candidate rows considered before partner-requested filtering.","default":0},"filtered_out_by_keywords":{"type":"integer","title":"Filtered Out By Keywords","description":"Rows dropped because they didn't match the caller's keyword filter.","default":0},"query_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Query Limit","description":"Maximum candidate rows considered before filtering."},"excluded_by_type":{"type":"integer","title":"Excluded By Type","description":"Rows dropped because their change type was not requested.","default":0},"source_categories_queried":{"items":{"type":"string"},"type":"array","title":"Source Categories Queried","description":"Document categories searched, derived from the requested document types."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error","description":"Error code when the tool returned an empty feed due to an environment issue (e.g. `postgres_unavailable`). Clients use this to distinguish 'no changes' from 'infrastructure down'."}},"additionalProperties":false,"type":"object","title":"ChangeFeedDiagnostics","description":"Operational diagnostics surfaced by the /tools/changes path.\n\nThese values help partners understand result counts and filtering without\nexposing RegCore implementation details."},"ChangeFeedEntry":{"properties":{"document_id":{"type":"string","title":"Document Id","description":"Stable RegCore document identifier."},"doc_type":{"type":"string","title":"Doc Type","description":"Partner-facing doc-type code (e.g. `acts_regulations`, `bills`)."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Display title, coalesced per doc type."},"jurisdiction":{"type":"string","title":"Jurisdiction","description":"Top-level regulatory jurisdiction (e.g. `Canada`)."},"sub_jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub Jurisdiction","description":"Second-level (e.g. `Federal`, `Ontario`)."},"change_type":{"type":"string","enum":["new_document","content_updated","details_updated"],"title":"Change Type","description":"`new_document` — newly published or newly added to RegCore. `content_updated` — the document text changed after initial availability. `details_updated` — descriptive details changed while the document text stayed stable."},"regulator_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Regulator Date","description":"Best available publisher/regulator-provided date."},"change_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Change Date","description":"Partner-facing change date used for sorting and filtering. For newly published documents this is usually the publisher/regulator date; for substantive content updates this is the later date RegCore observed the content change."},"relevance_score":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Relevance Score","description":"Best keyword relevance score for this changed document when requested."},"relevance_details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Relevance Details","description":"Optional keyword-match explanation with matching excerpt when requested."}},"type":"object","required":["document_id","doc_type","jurisdiction","change_type"],"title":"ChangeFeedEntry","description":"One partner-facing regulatory change record.\n\nUses `extra=\"ignore\"` for LLM-produced structured output resilience\n(see CorpusCitation docstring for rationale)."},"ChangeFeedV1":{"properties":{"schema_id":{"type":"string","const":"change_feed_v1","title":"Schema Id","default":"change_feed_v1"},"schema_version":{"type":"string","const":"v1","title":"Schema Version","default":"v1"},"since":{"type":"string","format":"date-time","title":"Since"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"total":{"type":"integer","title":"Total"},"changes":{"items":{"$ref":"#/components/schemas/ChangeFeedEntry"},"type":"array","title":"Changes"}},"additionalProperties":false,"type":"object","required":["since","generated_at","total","changes"],"title":"ChangeFeedV1","description":"Change feed entries with optional agent narration.\n\nDrives /tools/changes (deterministic, no agent narration) AND\n/regintel/chat with `template: change_feed_v1` (agent-enriched)."},"ChangesSpec":{"properties":{"since":{"type":"string","format":"date-time","title":"Since","description":"Return entries whose change date is >= this value (ISO 8601 with timezone, e.g. '2026-03-24T00:00:00Z'). The change date is the publisher/regulator date, unless RegCore observed a later substantive content change. `from_date` is accepted as a partner-friendly alias; responses still use `since`.","examples":["2026-03-24T00:00:00Z"]},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords","description":"Optional relevance query. RegCore first finds changed documents, then searches within those changed documents only and returns changes whose document content matches the selected keyword_match_mode."},"keyword_match_mode":{"type":"string","enum":["semantic","lexical","lexical_plus_semantic"],"title":"Keyword Match Mode","description":"How keywords filter changed documents. `semantic` uses scoped vector search with keyword_relevance_threshold. `lexical` requires keyword terms to appear in retrieved changed-document chunks. `lexical_plus_semantic` requires both and is the default to reduce false positives.","default":"lexical_plus_semantic"},"keyword_relevance_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Keyword Relevance Threshold","description":"Minimum semantic relevance score for keyword matching. Applies to semantic and lexical_plus_semantic modes. Default 0.55.","default":0.55},"include_relevance_details":{"type":"boolean","title":"Include Relevance Details","description":"When true and keywords are supplied, include relevance_score and a short matching excerpt for each returned change.","default":false},"jurisdictions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Jurisdictions","description":"Narrow to jurisdictions. Known values: ['Canada', 'Ontario']. Matches either a top-level jurisdiction or a sub-jurisdiction."},"doc_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Doc Types","description":"Narrow to document types. Known values: ['acts_regulations', 'bills', 'gazette', 'guidance', 'legislative_summary', 'news', 'ontario_acts_regulations', 'ontario_bills', 'ontario_gazette', 'ontario_instruments']. Omit or null to include all document types."},"max_items":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Max Items","description":"Maximum number of change entries to return (1–500).","default":100},"change_types":{"anyOf":[{"items":{"type":"string","enum":["new_document","content_updated","details_updated"]},"type":"array"},{"type":"null"}],"title":"Change Types","description":"Change types to include. Defaults to all change_date events: `new_document`, `content_updated`, and `details_updated`.","default":["new_document","content_updated","details_updated"]},"format":{"type":"string","const":"change_feed_v1","title":"Format","description":"Response format version. Only `change_feed_v1` today.","default":"change_feed_v1"}},"additionalProperties":false,"type":"object","required":["since"],"title":"ChangesSpec","description":"Input for `POST /tools/changes`.\n\nReturns documents whose partner-facing change date is at or after `since`.\nThe change date is the regulator/publisher date unless RegCore later\nobserved a substantive content revision after initial ingestion; in that\ncase the observed content-change date is used.\n\nDeterministic, no LLM. Returns `ChangeFeedV1`.","example":{"change_types":["new_document","content_updated"],"doc_types":["acts_regulations","bills"],"include_relevance_details":false,"jurisdictions":["Canada"],"keyword_match_mode":"semantic","keyword_relevance_threshold":0.55,"keywords":["data privacy","record keeping"],"max_items":50,"since":"2026-03-24T00:00:00Z"}},"ChatRequest":{"properties":{"message":{"type":"string","maxLength":8192,"minLength":1,"title":"Message","description":"User's question or instruction. Free-form text, 1-8192 chars.","examples":["What does PIPEDA say about data retention?"]},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Opaque conversation id. Reuse across calls to maintain state (Postgres checkpointer). Omit for one-shot stateless calls — the server will generate one and echo it back in the response.","examples":["partner-abc-123"]},"agent":{"type":"string","title":"Agent","description":"Agent profile. Only `compliance_copilot` is supported today.","default":"compliance_copilot"},"mode":{"anyOf":[{"type":"string","enum":["fast","hybrid","comprehensive"]},{"type":"null"}],"title":"Mode","description":"Agent reasoning depth. `fast` = minimal tool use (~5-15s). `hybrid` = balanced, the default. `comprehensive` = exhaustive retrieval (~60-120s). Omit to let the agent self-regulate. When `deep_research=true`, the server upgrades this to `comprehensive`."},"deep_research":{"type":"boolean","title":"Deep Research","description":"Run the request with the highest research budget. This upgrades the agent to comprehensive mode, keeps broad corpus retrieval, and pairs naturally with `allow_web_search=true` when external public-source research is required.","default":false},"template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template","description":"Named output template id (see GET `/regintel/chat/templates`). When set, `response.structured` is a Pydantic-validated payload. Omit for free-form markdown + native citations.","examples":["document_catalog_v1","federal_acts_catalog_v1","regulatory_brief_v1"]},"tools_allowlist":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools Allowlist","description":"Restrict this call's tool use to the listed RegCore tool interface tool names. If `web_search` or `current_status_answer` is in the list, `allow_web_search` must also be true."},"allow_web_search":{"type":"boolean","title":"Allow Web Search","description":"Opt-in for Exa web tools. Default false — web calls are blocked. When true, the agent MUST run at least one governed web call before finalizing. Web citations are included in the response citations automatically.","default":false},"allowed_web_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Web Domains","description":"Restrict web_search hits to these domains (suffix match, e.g. ['osfi-bsif.gc.ca', 'fintrac-canafe.canada.ca', 'canlii.org']). When set, injected as `include_domains` on every web_search call, overriding anything the agent would otherwise pass. Only takes effect when `allow_web_search=true`.","examples":[["osfi-bsif.gc.ca","fintrac-canafe.canada.ca"]]},"blocked_web_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Blocked Web Domains","description":"Exclude hits from these domains even when `allowed_web_domains` would otherwise include them. Injected as `exclude_domains` on web_search calls. Use for partner policies that ban specific sources (e.g. competitor sites, unreliable blogs)."},"citations_included":{"type":"boolean","title":"Citations Included","description":"When true, include the full citation evidence set in the top-level response envelope.","default":false},"include_reasoning_steps":{"type":"boolean","title":"Include Reasoning Steps","description":"When true, include reasoning/tool steps in the response envelope.","default":false},"include_governance":{"type":"boolean","title":"Include Governance","description":"When true, include the minimal governance receipt in the response envelope.","default":false},"jurisdictions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Jurisdictions","description":"Hint passed to retrieval tools (e.g. ['Canada']). Template presets lock this."},"doc_types":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Doc Types","description":"Hint passed to retrieval tools (e.g. ['acts_regulations'])."},"as_of":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"As Of","description":"Optional as-of date (YYYY-MM-DD) passed to retrieval."},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id","description":"Optional stable RegCore document id. Document-detail pages should send this with `document_type` when asking follow-up questions about a known document.","examples":["49"]},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type","description":"Optional document type filter (e.g. 'acts_regulations', 'guidance', 'ontario_bills'). Narrows retrieval when the caller already knows the document class.","examples":["ontario_bills"]},"document_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Title","description":"Optional human-readable document title used as a retrieval/message hint for document-detail chat. Prefer `document_id` + `document_type` for authoritative targeting; keep this value in sync with the title displayed to the user.","examples":["Plan to Protect Ontario Act (Budget Measures)"]}},"additionalProperties":false,"type":"object","required":["message"],"title":"ChatRequest","description":"Input for `POST /regintel/chat`.\n\nMinimum viable request: just `{\"message\": \"...\"}`. Add `template` to lock\nthe output shape; add `session_id` to continue a conversation.","example":{"message":"What does PIPEDA say about data retention?","template":"regulatory_brief_v1"}},"CorpusCitation":{"properties":{"source_type":{"type":"string","const":"corpus","title":"Source Type","description":"Always 'corpus' for a hit from our indexed regulatory corpus.","default":"corpus"},"document_id":{"type":"string","title":"Document Id","description":"Stable numeric id of the document in `RegCore document corpus`. Use with `GET /regintel/reference/document/{id}` (forthcoming) to fetch the full record.","examples":["758"]},"doc_type":{"type":"string","title":"Doc Type","description":"Partner-facing doc-type code (e.g. 'acts_regulations', 'bills', 'ontario_instruments'). Maps 1:1 to a `RegCore document corpus` table. See `/regintel/chat/templates` for the full enumeration."},"chunk_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Id","description":"Optional — the chunk_index in the paired `RegCore passage index` table when the citation is chunk-scoped. Null for document-scoped."},"section_heading":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Heading","description":"Heading of the cited section, when available."},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Human-readable document title. Null only for mid-migration rows."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Canonical source URL (regulator / publisher page) when known."},"chunk_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chunk Text","description":"Retrieved chunk text used as evidence for this citation, when available."},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score","description":"RegCore ranking service rerank-v3.5 score in [0, 1] when a real rerank ran on this citation. Null when only a heuristic match was available — do not treat a null as low relevance, treat it as unknown. No hard-filter floor is applied today; the raw score rides on the citation so partners can judge."}},"type":"object","required":["document_id","doc_type"],"title":"CorpusCitation","description":"Pointer to a retrieved-corpus doc/chunk the agent used.\n\nClosed shape — partners can depend on this exact set of fields.\nUses `extra=\"ignore\"` (not \"forbid\") because this model appears\ninside LLM-generated structured output: some RegCore model service models may\ninject unexpected keys (e.g. `reasoning`), and \"forbid\" would\nkill the entire response. \"ignore\" silently strips unknown fields\nwhile keeping validation strict on known ones."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"PartnerReasoningStep":{"properties":{"index":{"type":"integer","title":"Index"},"label":{"type":"string","title":"Label"},"category":{"type":"string","title":"Category","default":"utility"},"phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase"},"public_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Phase"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"narration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Narration"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"details":{"items":{"type":"string"},"type":"array","title":"Details"},"confidence_signal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Signal"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"result_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Summary"},"retrieved_document_ids":{"items":{"type":"string"},"type":"array","title":"Retrieved Document Ids"}},"additionalProperties":false,"type":"object","required":["index","label"],"title":"PartnerReasoningStep","description":"Partner-safe reasoning step.\n\nThis intentionally does not expose raw RegCore tool interface tool identifiers or raw argument\npayloads. UIs can render the label/category/status and use document lineage\nwithout learning internal tool names like `review relevant legal passages`."},"TraceDecisionSummary":{"properties":{"question":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question"},"answer_status":{"type":"string","title":"Answer Status"},"evidence_reviewed":{"type":"boolean","title":"Evidence Reviewed"},"documents_reviewed":{"type":"integer","title":"Documents Reviewed"},"citation_check":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Citation Check"},"schema_validated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Schema Validated"},"limitations":{"items":{"type":"string"},"type":"array","title":"Limitations"}},"additionalProperties":false,"type":"object","required":["answer_status","evidence_reviewed","documents_reviewed"],"title":"TraceDecisionSummary"},"TraceDetailResponse":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"api_path":{"type":"string","title":"Api Path"},"created_at":{"type":"string","title":"Created At"},"captured_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captured At"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"revoked":{"type":"boolean","title":"Revoked"},"view_count":{"type":"integer","title":"View Count"},"decision_summary":{"$ref":"#/components/schemas/TraceDecisionSummary"},"timeline":{"items":{"$ref":"#/components/schemas/TraceTimelineItem"},"type":"array","title":"Timeline"}},"additionalProperties":false,"type":"object","required":["trace_id","api_path","created_at","revoked","view_count","decision_summary"],"title":"TraceDetailResponse"},"TraceGovernanceSummary":{"properties":{"citation_check":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Citation Check"},"schema_validated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Schema Validated"},"response_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Id"}},"additionalProperties":false,"type":"object","title":"TraceGovernanceSummary"},"TraceInfo":{"properties":{"trace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trace Id","description":"RegCore trace snapshot id for this response. Use GET /traces/{trace_id}."},"api_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Path","description":"Authenticated API path for the trace JSON, e.g. /traces/{trace_id}."}},"additionalProperties":false,"type":"object","title":"TraceInfo","description":"Authenticated pointer to a RegCore trace snapshot.\n\n`trace_id` is the RegCore-owned snapshot identifier. It is not a public\nshare token; callers use it with the authenticated trace APIs:\nGET /traces for a user's list and GET /traces/{trace_id} for the trace JSON."},"TraceListItem":{"properties":{"trace_id":{"type":"string","title":"Trace Id"},"api_path":{"type":"string","title":"Api Path"},"created_at":{"type":"string","title":"Created At"},"captured_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captured At"},"view_count":{"type":"integer","title":"View Count"},"revoked":{"type":"boolean","title":"Revoked"}},"additionalProperties":false,"type":"object","required":["trace_id","api_path","created_at","view_count","revoked"],"title":"TraceListItem"},"TraceListResponse":{"properties":{"traces":{"items":{"$ref":"#/components/schemas/TraceListItem"},"type":"array","title":"Traces"}},"additionalProperties":false,"type":"object","title":"TraceListResponse"},"TraceTimelineItem":{"properties":{"index":{"type":"integer","title":"Index"},"stage":{"type":"string","title":"Stage"},"title":{"type":"string","title":"Title"},"summary":{"type":"string","title":"Summary"},"activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outcome"},"phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"},"narration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Narration"},"details":{"items":{"type":"string"},"type":"array","title":"Details"},"evidence_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Evidence Count"},"confidence_signal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Signal"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"},"document_ids":{"items":{"type":"string"},"type":"array","title":"Document Ids"}},"additionalProperties":false,"type":"object","required":["index","stage","title","summary"],"title":"TraceTimelineItem"},"Usage":{"properties":{"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"output_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Tokens"},"cache_read_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Read Input Tokens"},"cache_write_input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cache Write Input Tokens"}},"additionalProperties":false,"type":"object","title":"Usage"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"CatalogGovernanceSummary":{"properties":{"audit_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audit Id"},"citation_check":{"anyOf":[{"type":"string","enum":["passed","partial","failed","no_retrieval","misattributed"]},{"type":"null"}],"title":"Citation Check"},"pii_redacted_fields":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pii Redacted Fields"},"schema_validated":{"type":"boolean","title":"Schema Validated","default":false},"run_duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Run Duration Ms"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},"additionalProperties":false,"type":"object","title":"CatalogGovernanceSummary","description":"Governance observables surfaced to the partner alongside the catalog.\n\nDistinct from the top-level response governance (which carries\nreproducibility fields): this is per-tool-run governance specifically\nfor the retrieval pipeline that produced the buckets. For /regintel/chat,\nthe outer GovernanceSummary is authoritative and this stays null."},"Chat response":{"properties":{"id":{"type":"string","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"agent":{"$ref":"#/components/schemas/AgentInfo"},"answer":{"type":"string","title":"Answer"},"structured":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Structured"},"reasoning_steps":{"anyOf":[{"items":{"$ref":"#/components/schemas/PartnerReasoningStep"},"type":"array"},{"type":"null"}],"title":"Reasoning Steps"},"trace":{"anyOf":[{"$ref":"#/components/schemas/TraceInfo"},{"type":"null"}]},"usage":{"anyOf":[{"$ref":"#/components/schemas/Usage"},{"type":"null"}]},"template_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Used"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"additionalProperties":false,"type":"object","required":["id","created_at","agent","answer"],"title":"Chat response","description":"Clean response contract for external partner integrations."},"PartnerGovernanceSummary":{"properties":{"audit_id":{"type":"string","title":"Audit Id"},"citation_check":{"anyOf":[{"type":"string","enum":["passed","partial","failed","no_retrieval","misattributed"]},{"type":"null"}],"title":"Citation Check"},"schema_validated":{"type":"boolean","title":"Schema Validated","default":false},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Id"}},"additionalProperties":false,"type":"object","required":["audit_id"],"title":"PartnerGovernanceSummary","description":"Minimal partner-facing governance receipt.\n\nDeep reproducibility fields (template/config hashes, retrieval seeds,\nprovenance histograms, policy internals) are retained in audit storage and\nthe trace viewer rather than crowding every API response."}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Partner API key. Contact partners@regcore.ai to provision one."},"BearerAuth":{"type":"http","scheme":"bearer","description":"Same value as X-API-Key. Use whichever your HTTP client supports."}}},"tags":[{"name":"regintel","description":"Search the regulatory corpus and monitor source changes."},{"name":"chat","description":"Ask regulatory questions and receive cited, governed answers."},{"name":"traces","description":"List and retrieve authenticated trace JSON for the current user."},{"name":"partners","description":"Dashboard-only API key management."},{"name":"agents","description":"Coming soon: manage digital compliance agents."},{"name":"playbooks","description":"Coming soon: manage compliance playbooks."},{"name":"integrations","description":"Coming soon: manage workflow integrations."},{"name":"meta","description":"Public health and readiness checks."}],"x-tagGroups":[{"name":"Answer regulatory questions","tags":["chat"]},{"name":"Review trace evidence","tags":["traces"]},{"name":"Discover and detect changes","tags":["regintel"]},{"name":"Manage access","tags":["partners"]},{"name":"Manage agents","tags":["agents"]},{"name":"Manage playbooks","tags":["playbooks"]},{"name":"Manage integrations","tags":["integrations"]},{"name":"Reference","tags":["meta"]}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"x-regcore-mcp":{"summary":"Remote MCP endpoint for partner agent runtimes.","endpoint":"https://api.regcore.ai/mcp","transport":"streamable-http","authentication":{"schemes":["ApiKeyAuth","BearerAuth"],"headers":["X-API-Key","Authorization: Bearer <key>"],"description":"Use the same partner credential issued for the REST API."},"compatible_runtimes":["Claude","Cowork","Custom MCP clients"],"client_config_example":{"servers":{"regcore":{"url":"https://api.regcore.ai/mcp","headers":{"Authorization":"Bearer ${REGCORE_API_KEY}"}}}},"public_contract":["Runtime capability discovery is supported through the MCP client.","Only partner-facing tool names, input schemas, and response schemas are advertised.","Backend storage, ranking, retrieval, orchestration, and trace internals are not exposed."]}}