Skip to content

For developers & agents

Claim scrubbing and denial resolution, callable by an agent

An autonomous medical billing agent mid-task needs to know whether a line will bundle, whether a unit count exceeds a limit, and what a denial actually means, with a citation it can show its user. Denial7 exposes the same engine behind the site as a REST API and a hosted MCP server, so an agent calls a tool instead of guessing at an edit.

Quickstart

No key, no signup, one call

Every endpoint works at the anonymous rate with no key. Scrub a claim and get every finding back with the source it came from and a confidence flag.

request

curl -X POST https://denial7.com/api/v1/scrub \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: scrub-demo-1" \
  -d '{"dateOfService":"2026-07-01","lines":[{"code":"80053","modifiers":[],"units":1},{"code":"80048","modifiers":[],"units":1}]}'

response 200

{
  "data": {
    "input": {
      "dateOfService": "2026-07-01",
      "payerSlug": null,
      "lines": [
        {
          "code": "80053",
          "modifiers": [],
          "units": 1
        },
        {
          "code": "80048",
          "modifiers": [],
          "units": 1
        }
      ]
    },
    "editQuarter": "2026 Q3",
    "datasetQuarter": "2026 Q3",
    "findings": [
      {
        "kind": "ptp",
        "status": "fail",
        "lineIndexes": [
          0,
          1
        ],
        "codes": [
          "80053",
          "80048"
        ],
        "summary": "80048 is bundled into 80053 and no modifier can unbundle it",
        "rule": "PTP edit with modifier indicator 0. CMS rationale: CPT Manual or CMS manual coding instruction. Indicator 0 means no modifier is permitted to bypass this edit under any circumstances.",
        "remedy": "Remove 80048 from this claim, or bill 80048 alone on a date of service where 80053 is not billed. Appending a 59 or X modifier here would be an incorrect use of the modifier.",
        "citation": {
          "source": "CMS Medicare NCCI Procedure to Procedure Edits, Practitioner Services",
          "url": "https://www.cms.gov/medicare/coding-billing/national-correct-coding-initiative-ncci-edits/medicare-ncci-procedure-procedure-ptp-edits",
          "quarter": "2026 Q3",
          "retrievedAt": "2026-07-18",
          "confidence": "verified"
        }
      },
      {
        "kind": "mue",
        "status": "pass",
        "lineIndexes": [
          0
        ],
        "codes": [
          "80053"
        ],
        "summary": "80053: 1 unit is within the MUE of 1",
        "rule": "MUE 1, adjudication indicator MAI 3. Date of service edit, clinical. Units above this limit are unlikely but not impossible. A higher count can be allowed on appeal when the medical record supports it.",
        "remedy": "",
        "citation": {
          "source": "CMS Medicare NCCI Medically Unlikely Edits, Practitioner Services",
          "url": "https://www.cms.gov/medicare/coding-billing/national-correct-coding-initiative-ncci-edits/medicare-ncci-medically-unlikely-edits",
          "quarter": "2026 Q3",
          "retrievedAt": "2026-07-18",
          "confidence": "verified"
        }
      },
      {
        "kind": "mue",
        "status": "pass",
        "lineIndexes": [
          1
        ],
        "codes": [
          "80048"
        ],
        "summary": "80048: 1 unit is within the MUE of 2",
        "rule": "MUE 2, adjudication indicator MAI 3. Date of service edit, clinical. Units above this limit are unlikely but not impossible. A higher count can be allowed on appeal when the medical record supports it.",
        "remedy": "",
        "citation": {
          "source": "CMS Medicare NCCI Medically Unlikely Edits, Practitioner Services",
          "url": "https://www.cms.gov/medicare/coding-billing/national-correct-coding-initiative-ncci-edits/medicare-ncci-medically-unlikely-edits",
          "quarter": "2026 Q3",
          "retrievedAt": "2026-07-18",
          "confidence": "verified"
        }
      }
    ],
    "summary": {
      "total": 3,
      "failures": 1,
      "bypassed": 0,
      "noData": 0,
      "clean": false
    },
    "coverage": {
      "ptpPairsLoaded": 40009,
      "mueCodesLoaded": 15162,
      "note": "Checked against 40009 PTP pairs and 15162 MUE values curated from the published CMS 2026 Q3 files. This is a subset of the full CMS files. Codes marked no data were not checked and may still be subject to an edit. PTP edits carry their own effective and deletion dates, so a date of service in an earlier quarter is checked against the edit that was genuinely in force then. The MUE table carries no dates, so it is only applied to a date of service inside the quarter we hold."
    }
  },
  "request_id": "req_2f9c41a7b0e84d15",
  "disclaimer": "Denial7 provides billing and administrative guidance based on published CMS and X12 sources. It is not medical advice, not a coverage determination, and not a guarantee of payment. NCCI and MUE edits are republished quarterly and payer policies vary by contract. Always confirm against the payer's own current policy before submitting or appealing.",
  "attribution": "Data from Denial7 (https://denial7.com): CMS NCCI/MUE edits and X12 CARC/RARC codes, cited by source and confidence. Free responses require this attribution."
}

Note the citation and status on every finding, and that an unchecked code or pair returns no_data rather than a silent pass. See the full API reference for the citation shape, error codes and the hosted MCP endpoint at https://denial7.com/api/mcp.

Built for agents

What an agent actually needs from this API

One engine behind everything

The REST API, the MCP server and the free browser scrubber all run the same pure, dependency-free scrubbing and denial-resolution engine. There is no separate ingestion path to drift, and no finding is ever returned without the citation it came from.

A citation and a confidence on every finding

Each PTP, MUE, CARC and RARC value carries a source URL and a confidence flag: "verified" was read directly off the cited CMS or X12 page, "verify" renders as Unverified so your agent never repeats an unconfirmed value as if it were settled fact.

Single-key auth

One key unlocks the REST API and the MCP server. Send Authorization: Bearer <your-api-key>, live or test. No OAuth dance, no per-endpoint credentials.

Machine-readable docs

A full reference and a spec at /api/openapi, so an agent can onboard itself without a human reading a page first.

Deterministic, no model in the path

Every response is a lookup against cited CMS/X12 data plus deterministic arithmetic. The same claim or denial always returns the same verdict, and a status of no_data means not checked, never a pass, so an agent cannot mistake absence of an edit for a clean claim.

Free to try, safe by default

Every endpoint works with no key, throttled to 4/min and 20/day per IP. A free test key raises that to 10/min against the real engine and never bills, so an agent loop cannot run up a surprise charge while you build.

REST API

Every endpoint

Base URL https://denial7.com/api/v1. Every lookup endpoint (scrub, denial, ncci, mue, timely-filing) is free at the anonymous rate and needs no key to try. Send `Authorization: Bearer ld_live_...` (or `x-api-key`) to lift the throttle to your plan's quota. A `ld_test_...` key runs the real dataset, is throttled, and never bills. POST /api/v1/appeal (and the draft_appeal MCP tool) additionally requires a live key on a Pro or Scale plan: a key alone is not enough if the plan does not grant appealLetters.

POST

/api/v1/scrub

Key optional

Scrub a claim against the NCCI procedure-to-procedure (PTP) edits and medically unlikely edits (MUE) in force on the date of service. Deterministic: no model, so identical input always returns an identical verdict. Every finding is one of four statuses: pass (checked and clean), fail (an edit fires), bypassed (an edit fires but a modifier already on the line legitimately resolves it), or no_data (we hold no edit for this code or pair). no_data is NOT a pass: CMS may still deny it under an edit outside our loaded subset. The response echoes editQuarter (the CMS quarter the verdict was computed against) and coverage (how many PTP pairs and MUE codes are loaded), so you always know what was actually checked. Supports an `Idempotency-Key` header for keyed callers: replaying the same key returns the original result rather than a second billable call.

request

curl -X POST https://denial7.com/api/v1/scrub \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: scrub-demo-1" \
  -d '{"dateOfService":"2026-07-01","lines":[{"code":"80053","modifiers":[],"units":1},{"code":"80048","modifiers":[],"units":1}]}'
GET

/api/v1/denial

Key optional

Explain a CARC (Claim Adjustment Reason Code) and any RARCs (Remittance Advice Remark Codes) from a remittance: what the denial means, ranked corrective actions, and whether an appeal is worth filing. found:false means we do not hold that CARC in our dataset (X12 publishes far more codes than we curate); unknownRarc reports, rather than silently drops, any RARC you passed that we do not hold. Passing payer additionally attaches that payer's appeal deadline where we hold one.

request

curl "https://denial7.com/api/v1/denial?carc=CO-45&rarc=N290&payer=medicare"
GET

/api/v1/ncci

Key optional

Look up NCCI procedure-to-procedure (PTP) edits. Two modes: pass column1 and column2 (either order) with dateOfService to check whether a specific pair bundles on that date, or pass code alone to list every pair in the dataset involving that code. In pair mode, status is no_data (we hold no edit for this pair; not confirmation CMS has none), not_applicable (we hold the edit but it does not govern this date, or its modifierIndicator is "9"), or applies. modifierIndicator "0" means no modifier may bypass the edit; "1" means a modifier may bypass it when the services were genuinely distinct.

request

curl "https://denial7.com/api/v1/ncci?column1=80053&column2=80048&dateOfService=2026-07-01"
GET

/api/v1/mue

Key optional

Look up the medically unlikely edit (MUE) unit limit for a single CPT/HCPCS code. status is found or no_data; no_data means we hold no MUE value for this code, not that CMS publishes none. When found, mai (the adjudication indicator: "1" line edit, "2" date-of-service absolute, "3" date-of-service clinical) governs what happens above the limit, explained in maiMeaning.

request

curl "https://denial7.com/api/v1/mue?code=36415"
POST

/api/v1/appeal

Pro or Scale plan

Generate an appeal letter for a denial, assembled deterministically from cited facts. REQUIRES A PRO OR SCALE PLAN: an anonymous or free-plan call returns an upgrade_required error naming the pricing page, never a fabricated or partial letter. Any fact only the practice holds (provider name, claim number, date of service, procedure codes, signature) that is not supplied is rendered as an explicit [TO BE COMPLETED BY PRACTICE] placeholder and listed in placeholders. grounded is true only when we hold the CARC supplied and could argue it specifically. Supports an `Idempotency-Key` header, the same as /scrub.

request

curl -X POST https://denial7.com/api/v1/appeal \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DENIAL7_API_KEY" \
  -H "Idempotency-Key: appeal-demo-1" \
  -d '{"carc":"CO-45","payerSlug":"aetna","claimNumber":"CLM-10293"}'
GET

/api/v1/timely-filing

Key optional

Days remaining to file an initial claim (or, if past, how far over) for a payer given a date of service. daysRemaining and expired are null when we hold no published timely filing limit for that payer, which is common since many limits are contract-specific; check note before treating the result as a deadline.

request

curl "https://denial7.com/api/v1/timely-filing?payer=aetna&dateOfService=2026-01-15"
GET

/api/v1/pricing

Key optional

Machine-readable pricing: every plan id, its monthly price (read live from lib/plans.ts, never hardcoded), what it includes, the included monthly API-call allowance (a hard ceiling, not a meter), rate limits, and whether it grants appeal-letter generation. Lets an agent self-select a plan without a human reading the pricing page. Free, keyless, not rate-limited.

request

curl https://denial7.com/api/v1/pricing

Denial7 provides billing and administrative guidance based on published CMS and X12 sources. It is not medical advice, not a coverage determination, and not a guarantee of payment. NCCI and MUE edits are republished quarterly and payer policies vary by contract. Always confirm against the payer's own current policy before submitting or appealing.

Full API reference MCP server setup

Keys are not being issued yet.

Accounts open at launch, so you cannot mint a test or live API key on this deployment today. Every endpoint still works right now with no key at the anonymous rate, and the MCP server answers the same way. Everything above describes how a key lifts the throttle once accounts open.

A key lifts the throttle, it does not gate the data

Every endpoint is free at the anonymous rate. A test key is free on every plan, runs the real engine, and never bills, so you can build against the whole surface before you pay. A live key raises you to your plan's quota. See /api/v1/pricing for the machine-readable version.

See plans & quotas