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.
Base URL
Section titled “Base URL”https://api.midlyr.com/api/v1Endpoints
Section titled “Endpoints”| Endpoint | Method | OperationId | Purpose |
|---|---|---|---|
/regulations | GET | listRegulations | List the compliance-source catalog with optional query and filters |
/regulations/{id} | GET | getRegulationDetails | Fetch a single document’s metadata, total size, and table of contents |
/regulations/{id}/content | GET | getRegulationContent | Fetch document text by byte offset |
/regulations/query | POST | queryRegulations | Return the regulation chunks most relevant to a natural-language query |
/analysis/screen | POST | createScreenAnalysisJob | Submit an asynchronous compliance-screening analysis job |
/analysis/risk | POST | createRiskAssessmentJob | Submit a fast numeric risk-assessment job and receive the score inline |
/events | POST | createEvent | Submit a compliance event signal that creates (or idempotently matches) a ticket |
/jobs | GET | listJobs | List jobs in the team’s history with optional filters |
/jobs/{id} | GET | getJob | Retrieve 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*.
Objects
Section titled “Objects”The API uses these shared objects across endpoint responses:
| Object | Used by |
|---|---|
| Regulation Summary Object | List Regulations, Query Regulations, Screen Analysis citations |
| Regulation Detail Object | Get Regulation Details, Get Regulation Content |
| Regulation Content Object | Get Regulation Content |
| Regulation Citation Object | Query Regulations, Screen Analysis findings |
| Job Object | Get Job |
| Job Summary Object | List Jobs |
| Screen Analysis Result Object | Succeeded screen-analysis jobs |
| Risk Assessment Result Object | Succeeded risk-assessment jobs |
Request and Response Entities
Section titled “Request and Response Entities”Endpoint-specific request and response envelopes are documented on their endpoint pages. The OpenAPI schema currently includes:
| Entity | Endpoint |
|---|---|
CreateScreenAnalysisJobRequest | Create Screen Analysis Job |
CreateScreenAnalysisJobResponse | Create Screen Analysis Job |
CreateRiskAssessmentJobRequest | Create Risk Assessment Job |
CreateRiskAssessmentJobResponse | Create Risk Assessment Job |
CreateEventRequest | Create Event |
CreateEventResponse | Create Event |
GetRegulationContentRequest | Get Regulation Content |
GetRegulationContentResponse | Get Regulation Content |
ListRegulationsRequest | List Regulations |
ListRegulationsResponse | List Regulations |
QueryRegulationsRequest | Query Regulations |
QueryRegulationsResponse | Query Regulations |
ListJobsRequest | List Jobs |
ListJobsResponse | List Jobs |
ErrorResponse | Errors |
Regulation Wikis
Section titled “Regulation Wikis”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.
| Endpoint | Method | OperationId | Purpose |
|---|---|---|---|
/regulation-wikis | GET | listRegulationWikis | List and search the wiki catalog by domain or keyword |
/regulation-wikis/{slug} | GET | getRegulationWiki | Fetch the full synthesized playbook for an activity |
Quick example — fetch the SAR filing playbook:
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.
Versioning
Section titled “Versioning”- 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
Section titled “Timestamps”- 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
Provenance
Section titled “Provenance”Every document carries enough source provenance for verification without a follow-up call:
id— stable identifiertitle— human-readable namesourceUrl— link to the upstream source