{"openapi":"3.1.0","info":{"title":"ExChek API","version":"2.1.0","summary":"Free, no-auth regulatory data + agent skill content for U.S. export compliance.","description":"ExChek mirrors EAR (15 CFR) and ITAR (22 CFR) regulatory data from eCFR, and serves the full content of the 20 ExChek skills over HTTP and MCP. Regulatory data and skill content are free with no authentication; document rendering (/pdf/*) is an Enterprise feature gated by API key.\n\nTwo surfaces share this base URL:\n- **REST** (this spec): traditional HTTP + JSON, ideal for direct integrations, Postman, SDK codegen.\n- **MCP** (POST /mcp): Model Context Protocol over Streamable HTTP (JSON-RPC 2.0). Use this from LLM-driven agents. See GET /.well-known/mcp for discovery.\n\nExChek is software, not legal advice. Every determination is reviewed and approved by you.","termsOfService":"https://docs.exchek.us/docs/legal/terms","contact":{"name":"ExChek support","email":"matt@exchek.us","url":"https://exchek.us"},"license":{"name":"Proprietary","url":"https://docs.exchek.us/docs/legal/terms"}},"servers":[{"url":"https://api.exchek.us","description":"Production"},{"url":"https://api.exchek.us","description":"Production (canonical)"}],"tags":[{"name":"Service","description":"Index, health, and machine-readable specs."},{"name":"eCFR","description":"Live regulatory data, edge-cached."},{"name":"Skills","description":"ExChek skill content over HTTP."},{"name":"Documents","description":"Branded compliance document rendering (Enterprise — API key required, including for the payload contract)."},{"name":"MCP","description":"Model Context Protocol surface."},{"name":"Deprecated","description":"Removed endpoints (410 Gone)."}],"paths":{"/":{"get":{"tags":["Service"],"summary":"API index","description":"Self-describing JSON: name, version, endpoint directory, and the live list of supported eCFR parts.","responses":{"200":{"description":"Service descriptor.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/health":{"get":{"tags":["Service"],"summary":"Health check","description":"Returns API health, eCFR upstream reachability, and edge cache settings. Not cached.","responses":{"200":{"description":"Health snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"service":{"type":"string"},"version":{"type":"string"},"runtime":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"ecfr":{"type":"string","description":"'ok' or 'error: ...'."},"cache":{"type":"object"}}}}}}}}},"/openapi.json":{"get":{"tags":["Service"],"summary":"This OpenAPI 3.1 spec","description":"Machine-readable description of every REST endpoint. Stable URL; safe to consume by codegen tools.","responses":{"200":{"description":"OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/api/ecfr/meta":{"get":{"tags":["eCFR"],"summary":"Supported parts + cache settings","responses":{"200":{"description":"Meta payload with the live supported-parts list.","content":{"application/json":{"schema":{"type":"object","properties":{"supportedParts":{"type":"array","items":{"$ref":"#/components/schemas/SupportedPart"}},"cache":{"type":"object"},"refreshSchedule":{"type":"string"},"source":{"type":"string","format":"uri"}}}}}}}}},"/api/ecfr/{part}":{"get":{"tags":["eCFR"],"summary":"Full part structure","description":"Hierarchical eCFR structure for a supported CFR part, sourced live from www.ecfr.gov and edge-cached.","parameters":[{"name":"part","in":"path","required":true,"schema":{"type":"integer","enum":[121,732,734,738,740,742,744,746,748,762,772,774]},"description":"CFR part number.","example":774}],"responses":{"200":{"description":"Part structure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CfrTreeNode"}}}},"400":{"description":"Unsupported part number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"eCFR upstream temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/ecfr/{part}/sections":{"get":{"tags":["eCFR"],"summary":"Flat list of sections within a part","parameters":[{"name":"part","in":"path","required":true,"schema":{"type":"integer","enum":[121,732,734,738,740,742,744,746,748,762,772,774]},"example":762}],"responses":{"200":{"description":"Sections payload.","content":{"application/json":{"schema":{"type":"object","properties":{"part":{"type":"integer"},"label":{"type":"string"},"count":{"type":"integer"},"sections":{"type":"array","items":{"type":"object","properties":{"identifier":{"type":"string"},"label":{"type":"string"},"content":{"type":"string"}}}}}}}}},"400":{"description":"Unsupported part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"eCFR upstream temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/ecfr/{part}/search":{"get":{"tags":["eCFR"],"summary":"Full-text search within a part","parameters":[{"name":"part","in":"path","required":true,"schema":{"type":"integer","enum":[121,732,734,738,740,742,744,746,748,762,772,774]},"example":774},{"name":"q","in":"query","required":true,"schema":{"type":"string"},"example":"encryption"},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":20,"default":10}}],"responses":{"200":{"description":"Search results.","content":{"application/json":{"schema":{"type":"object","properties":{"part":{"type":"integer"},"title":{"type":"integer"},"label":{"type":"string"},"query":{"type":"string"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SearchResult"}},"meta":{"type":"object"},"source":{"type":"string"}}}}}},"400":{"description":"Missing query or unsupported part.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"eCFR search upstream temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/ecfr/search":{"get":{"tags":["eCFR"],"summary":"Full-text search across a CFR title","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"example":"missile"},{"name":"title","in":"query","schema":{"type":"integer","enum":[15,22],"default":15}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"per_page","in":"query","schema":{"type":"integer","minimum":1,"maximum":20,"default":10}}],"responses":{"200":{"description":"Title-wide search results.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Missing query or unsupported title.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"eCFR search upstream temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skills":{"get":{"tags":["Skills"],"summary":"List all ExChek skills","description":"Returns metadata + asset URLs for every supported skill. Currently 20 skills.","responses":{"200":{"description":"Skill index.","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"upstream":{"type":"string","format":"uri"},"mcp":{"type":"string","format":"uri"},"skills":{"type":"array","items":{"$ref":"#/components/schemas/SkillMeta"}}}}}}}}}},"/skills/{name}":{"get":{"tags":["Skills"],"summary":"SKILL.md for a named skill","description":"Returns the full SKILL.md as `text/markdown`. Load this into your agent's context to run the skill client-side.","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","enum":["exchek-classify","exchek-audit-lookback","exchek-compliance-report","exchek-country-risk","exchek-csl","exchek-deemed-export","exchek-docx","exchek-ecp","exchek-encryption","exchek-export-docs","exchek-jurisdiction","exchek-license","exchek-partner-compliance","exchek-recordkeeping","exchek-red-flag-assessment","exchek-risk-triage","exchek-analytics","exchek-onboarding","exchek-orchestrator","exchek-setup"]},"example":"exchek-csl"}],"responses":{"200":{"description":"SKILL.md markdown.","content":{"text/markdown":{"schema":{"type":"string"}}}},"400":{"description":"Unknown skill.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Upstream skill repo temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skills/{name}/bundle":{"get":{"tags":["Skills"],"summary":"SKILL.md + all auxiliary files","description":"Returns SKILL.md plus every template, reference, and prompt file for the named skill in one JSON payload. Use this when you want the complete skill package without N round-trips.","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","enum":["exchek-classify","exchek-audit-lookback","exchek-compliance-report","exchek-country-risk","exchek-csl","exchek-deemed-export","exchek-docx","exchek-ecp","exchek-encryption","exchek-export-docs","exchek-jurisdiction","exchek-license","exchek-partner-compliance","exchek-recordkeeping","exchek-red-flag-assessment","exchek-risk-triage","exchek-analytics","exchek-onboarding","exchek-orchestrator","exchek-setup"]},"example":"exchek-license"}],"responses":{"200":{"description":"Skill bundle.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillBundle"}}}},"400":{"description":"Unknown skill.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Upstream skill repo temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skills/{name}/templates/{filename}":{"get":{"tags":["Skills"],"summary":"A skill template","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","enum":["exchek-classify","exchek-audit-lookback","exchek-compliance-report","exchek-country-risk","exchek-csl","exchek-deemed-export","exchek-docx","exchek-ecp","exchek-encryption","exchek-export-docs","exchek-jurisdiction","exchek-license","exchek-partner-compliance","exchek-recordkeeping","exchek-red-flag-assessment","exchek-risk-triage","exchek-analytics","exchek-onboarding","exchek-orchestrator","exchek-setup"]}},{"name":"filename","in":"path","required":true,"schema":{"type":"string"},"description":"Template filename, URL-encoded if it contains spaces.","example":"License%20Determination%20Memo.md"}],"responses":{"200":{"description":"Template markdown.","content":{"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"Skill has no template by that name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Upstream skill repo temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skills/{name}/references/{filename}":{"get":{"tags":["Skills"],"summary":"A skill reference","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","enum":["exchek-classify","exchek-audit-lookback","exchek-compliance-report","exchek-country-risk","exchek-csl","exchek-deemed-export","exchek-docx","exchek-ecp","exchek-encryption","exchek-export-docs","exchek-jurisdiction","exchek-license","exchek-partner-compliance","exchek-recordkeeping","exchek-red-flag-assessment","exchek-risk-triage","exchek-analytics","exchek-onboarding","exchek-orchestrator","exchek-setup"]}},{"name":"filename","in":"path","required":true,"schema":{"type":"string"},"example":"cui-classified.md"}],"responses":{"200":{"description":"Reference markdown.","content":{"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"Skill has no reference by that name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Upstream skill repo temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/skills/{name}/prompts/{filename}":{"get":{"tags":["Skills"],"summary":"A skill prompt","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","enum":["exchek-classify","exchek-audit-lookback","exchek-compliance-report","exchek-country-risk","exchek-csl","exchek-deemed-export","exchek-docx","exchek-ecp","exchek-encryption","exchek-export-docs","exchek-jurisdiction","exchek-license","exchek-partner-compliance","exchek-recordkeeping","exchek-red-flag-assessment","exchek-risk-triage","exchek-analytics","exchek-onboarding","exchek-orchestrator","exchek-setup"]}},{"name":"filename","in":"path","required":true,"schema":{"type":"string"},"example":"license-system.md"}],"responses":{"200":{"description":"Prompt markdown.","content":{"text/markdown":{"schema":{"type":"string"}}}},"404":{"description":"Skill has no prompt by that name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Upstream skill repo temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/ecfr/{part}/text/{section}":{"get":{"tags":["eCFR"],"summary":"Full section text (HTML fragment)","description":"The complete text of one CFR section as a formatted HTML fragment (via eCFR's renderer API, edge-cached). Powers the eCFR Workbench reader at app.exchek.us.","parameters":[{"name":"part","in":"path","required":true,"schema":{"type":"integer"}},{"name":"section","in":"path","required":true,"schema":{"type":"string","example":"740.17"}}],"responses":{"200":{"description":"HTML fragment.","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Unsupported part or invalid section id."},"503":{"description":"eCFR upstream unavailable."}}}},"/pdf/classification/contract":{"get":{"tags":["Documents"],"summary":"Classification memorandum payload contract (Enterprise)","security":[{"enterpriseKey":[]}],"description":"The full payload schema for POST /pdf/classification: all 172 template fields with placeholder values, the required-field list, raw-HTML narrative fields, CSS-class enums, and authoring rules. Part of the Enterprise product — requires the same API key as the render endpoint (purchase at /enterprise/checkout). Fetch this before building a payload — typically after completing an analysis with the exchek-classify skill.","responses":{"200":{"description":"Contract document.","content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"string"},"version":{"type":"string"},"required":{"type":"array","items":{"type":"string"}},"raw_html_fields":{"type":"array","items":{"type":"string"}},"enums":{"type":"object"},"authoring_notes":{"type":"array","items":{"type":"string"}},"fields":{"type":"object","description":"Every accepted key with a placeholder value."}}}}}}}}},"/pdf/classification":{"post":{"tags":["Documents"],"summary":"Render a classification memorandum PDF (Enterprise)","description":"Renders a completed export-classification analysis into ExChek's branded, audit-ready PDF memorandum (~28 pages: executive summary, Order of Review, license determination, screening record, red-flag checklist, signature chain, per-sheet page numbers and confidentiality footers). **Enterprise feature** — requires an `Authorization: Bearer exk_live_…` API key; contact matt@exchek.us. Rendering is stateless: the payload is processed in memory and discarded — never stored, never logged. The payload must not contain CUI or classified information. MCP equivalent: the `create_classification_pdf` tool.","security":[{"enterpriseKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Template variables per GET /pdf/classification/contract (172 keys; 8 required).","additionalProperties":true}}}},"responses":{"200":{"description":"The rendered memorandum. Content-Disposition carries a filename derived from DOC_NUMBER; X-Render-Warnings counts non-fatal payload issues.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid JSON, missing required fields, or malformed arrays (details name the fields).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Missing or unrecognized API key. Response includes Enterprise plan and contact information.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API key inactive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Payload exceeds 1 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"PDF rendering upstream temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mcp":{"post":{"tags":["MCP"],"summary":"Model Context Protocol endpoint (JSON-RPC 2.0)","description":"Streamable HTTP MCP server. POST a JSON-RPC envelope; receive a JSON-RPC response. Supports `initialize`, `ping`, `tools/list`, `tools/call`, `resources/list`, `resources/read`, `resources/templates/list`, plus `notifications/*` (return 202 with no body). See GET /.well-known/mcp for capabilities.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","method"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"description":"Request ID (omit for notifications)."},"method":{"type":"string","example":"tools/list"},"params":{"type":"object"}}}}}},"responses":{"200":{"description":"JSON-RPC response.","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Notification accepted (no body)."},"400":{"description":"Parse error or invalid JSON-RPC envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed (GET on /mcp).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/.well-known/mcp":{"get":{"tags":["MCP"],"summary":"MCP server discovery","description":"Protocol version, server info, tool/resource counts, and the canonical /mcp endpoint URL.","responses":{"200":{"description":"MCP discovery document.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/api/classify/{path}":{"get":{"tags":["Deprecated"],"summary":"[REMOVED] Classification endpoints","description":"Classification endpoints were removed in the skill-first pivot. Use the exchek-classify skill (GET /skills/exchek-classify), which calls /api/ecfr/* for regulatory data and builds reports locally. All HTTP methods return 410.","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"410":{"description":"Endpoint removed with migration guidance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/expert-review/{path}":{"get":{"tags":["Deprecated"],"summary":"[REMOVED] Expert review portal","description":"Retired in favor of the classification skill's local audit logs. All HTTP methods return 410.","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"410":{"description":"Endpoint removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error","message"],"properties":{"error":{"type":"string","description":"Short error code."},"message":{"type":"string","description":"Human-readable explanation."}}},"SupportedPart":{"type":"object","required":["part","title","label"],"properties":{"part":{"type":"integer","description":"CFR part number."},"title":{"type":"integer","enum":[15,22],"description":"CFR title number."},"label":{"type":"string","description":"Human-readable part title."},"endpoint":{"type":"string","description":"Relative URL to the part structure."},"search":{"type":"string","description":"Relative URL to part-scoped search."}}},"CfrTreeNode":{"type":"object","description":"Recursive eCFR structure node. Shape follows the eCFR versioner schema (identifier, label, label_level, type, children).","properties":{"identifier":{"type":"string"},"label":{"type":"string"},"label_level":{"type":"string"},"label_description":{"type":"string"},"type":{"type":"string","description":"e.g. 'title', 'subchapter', 'part', 'section', 'appendix'."},"children":{"type":"array","items":{"type":"object"}}},"additionalProperties":true},"SearchResult":{"type":"object","properties":{"type":{"type":"string"},"score":{"type":"number"},"part":{"type":"integer"},"section":{"type":"string"},"sectionHeading":{"type":"string"},"partHeading":{"type":"string"},"excerpt":{"type":"string","description":"May contain <strong> highlights."},"startsOn":{"type":"string","format":"date"},"endsOn":{"type":"string","format":"date","nullable":true}}},"SkillMeta":{"type":"object","required":["name","description"],"properties":{"name":{"type":"string","enum":["exchek-classify","exchek-audit-lookback","exchek-compliance-report","exchek-country-risk","exchek-csl","exchek-deemed-export","exchek-docx","exchek-ecp","exchek-encryption","exchek-export-docs","exchek-jurisdiction","exchek-license","exchek-partner-compliance","exchek-recordkeeping","exchek-red-flag-assessment","exchek-risk-triage","exchek-analytics","exchek-onboarding","exchek-orchestrator","exchek-setup"]},"description":{"type":"string"},"upstream":{"type":"string","format":"uri"},"urls":{"type":"object","properties":{"skill_md":{"type":"string","format":"uri"},"bundle":{"type":"string","format":"uri"},"templates":{"type":"array","items":{"type":"string","format":"uri"}},"references":{"type":"array","items":{"type":"string","format":"uri"}},"prompts":{"type":"array","items":{"type":"string","format":"uri"}}}},"assets":{"type":"object","properties":{"templates":{"type":"array","items":{"type":"string"}},"references":{"type":"array","items":{"type":"string"}},"prompts":{"type":"array","items":{"type":"string"}}}}}},"SkillBundle":{"type":"object","required":["name","skill_md"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"upstream":{"type":"string","format":"uri"},"skill_md":{"type":"string","description":"Full SKILL.md markdown content."},"templates":{"type":"object","additionalProperties":{"type":"string","description":"Template markdown."}},"references":{"type":"object","additionalProperties":{"type":"string","description":"Reference markdown."}},"prompts":{"type":"object","additionalProperties":{"type":"string","description":"Prompt markdown."}}}}},"securitySchemes":{"enterpriseKey":{"type":"http","scheme":"bearer","description":"ExChek Enterprise API key (exk_live_…). Required for document rendering. Contact matt@exchek.us."}}},"externalDocs":{"url":"https://docs.exchek.us/docs/api-reference","description":"Human-readable API reference"},"x-supported-parts":[{"part":121,"title":22,"label":"US Munitions List (USML)"},{"part":732,"title":15,"label":"Steps for Using the EAR"},{"part":734,"title":15,"label":"Scope of the Export Administration Regulations"},{"part":738,"title":15,"label":"Commerce Country Chart"},{"part":740,"title":15,"label":"License Exceptions"},{"part":742,"title":15,"label":"Control Policy — CCL Based Controls"},{"part":744,"title":15,"label":"End-Use Controls (Entity List, Military End-Use)"},{"part":746,"title":15,"label":"Embargoes and Other Special Controls"},{"part":748,"title":15,"label":"Applications (Classification, Advisory, and License) and Documentation"},{"part":762,"title":15,"label":"Recordkeeping"},{"part":772,"title":15,"label":"Definitions of Terms"},{"part":774,"title":15,"label":"Commerce Control List (CCL)"}],"x-supported-skills":["exchek-classify","exchek-audit-lookback","exchek-compliance-report","exchek-country-risk","exchek-csl","exchek-deemed-export","exchek-docx","exchek-ecp","exchek-encryption","exchek-export-docs","exchek-jurisdiction","exchek-license","exchek-partner-compliance","exchek-recordkeeping","exchek-red-flag-assessment","exchek-risk-triage","exchek-analytics","exchek-onboarding","exchek-orchestrator","exchek-setup"]}