Skip to content

API Overview

The MidLyr API provides programmatic access to regulatory source retrieval and compliance analysis for banks and fintechs. The Regulations API exposes the full body of compliance sources a US bank or fintech must follow; the Analysis API evaluates submitted content for regulatory risk.

https://api.midlyr.com/api/v1
EndpointMethodOperationIdPurpose
/regulationsGETlistRegulationsList the compliance-source catalog with optional query and filters
/regulations/{id}GETgetRegulationDetailsFetch a single document’s metadata, total size, and table of contents
/regulations/{id}/contentGETgetRegulationContentFetch document text by byte offset
/regulations/queryPOSTqueryRegulationsReturn the regulation chunks most relevant to a natural-language query
/analysis/screenPOSTcreateScreenAnalysisJobSubmit an asynchronous compliance-screening analysis job
/analysis/riskPOSTcreateRiskAssessmentJobSubmit a fast numeric risk-assessment job and receive the score inline
/eventsPOSTcreateEventSubmit a compliance event signal that creates (or idempotently matches) a ticket
/jobsGETlistJobsList jobs in the team’s history with optional filters
/jobs/{id}GETgetJobRetrieve async job status and typed result when available

OperationIds follow a consistent verb convention. Resource collections use list*, single records use get*, search endpoints use query*, and asynchronous job submitters use create*.

The API uses these shared objects across endpoint responses:

ObjectUsed by
Regulation Summary ObjectList Regulations, Query Regulations, Screen Analysis citations
Regulation Detail ObjectGet Regulation Details, Get Regulation Content
Regulation Content ObjectGet Regulation Content
Regulation Citation ObjectQuery Regulations, Screen Analysis findings
Job ObjectGet Job
Job Summary ObjectList Jobs
Screen Analysis Result ObjectSucceeded screen-analysis jobs
Risk Assessment Result ObjectSucceeded risk-assessment jobs

Endpoint-specific request and response envelopes are documented on their endpoint pages. The OpenAPI schema currently includes:

EntityEndpoint
CreateScreenAnalysisJobRequestCreate Screen Analysis Job
CreateScreenAnalysisJobResponseCreate Screen Analysis Job
CreateRiskAssessmentJobRequestCreate Risk Assessment Job
CreateRiskAssessmentJobResponseCreate Risk Assessment Job
CreateEventRequestCreate Event
CreateEventResponseCreate Event
GetRegulationContentRequestGet Regulation Content
GetRegulationContentResponseGet Regulation Content
ListRegulationsRequestList Regulations
ListRegulationsResponseList Regulations
QueryRegulationsRequestQuery Regulations
QueryRegulationsResponseQuery Regulations
ListJobsRequestList Jobs
ListJobsResponseList Jobs
ErrorResponseErrors

MidLyr’s Regulation Wikis API exposes a catalog of synthesized compliance playbooks — one per compliance activity (e.g. sar-filing, ctr-filing). Each wiki is a one-call answer to “what do I do for activity X?”: a cross-authority synthesis drawn from statutes, regulations, and examination handbooks, with inline citations back to the underlying source documents.

EndpointMethodOperationIdPurpose
/regulation-wikisGETlistRegulationWikisList and search the wiki catalog by domain or keyword
/regulation-wikis/{slug}GETgetRegulationWikiFetch the full synthesized playbook for an activity

Quick example — fetch the SAR filing playbook:

Terminal window
curl "https://api.midlyr.com/api/v1/regulation-wikis/sar-filing" \
-H "x-api-key: $MIDLYR_API_KEY"

The response includes a body (markdown in Authority Chain format) and a sources array of externalId slugs, each resolvable via GET /regulations/{externalId}. See List Regulation Wikis and Get Regulation Wiki for full endpoint docs.

  • Version is in the path: /api/v1/...
  • Additive changes are allowed in v1: new optional query parameters, new response fields, new enum values, and new category/authorities/jurisdictions entries
  • Breaking changes require a new version: removing fields, renaming fields, changing field types, or changing the meaning of existing enum values

Document IDs are cmdoc_-prefixed ULIDs, for example cmdoc_01HXZ3K4M7QR9VP2N8WYJF5GTB. They are stable, unique, and never reused in v1.

  • Timestamps are ISO 8601 UTC strings: 2026-04-11T00:00:00Z
  • Calendar dates are ISO 8601 date strings: 2024-09-15
  • v1 returns English content only

Every document carries enough source provenance for verification without a follow-up call:

  • id — stable identifier
  • title — human-readable name
  • sourceUrl — link to the upstream source