# Medicare enrollment for an NPI

URL: https://docs.healthcare.dev/reference/providers/medicare-enrollment-for-an-npi

```http
GET https://api.healthcare.dev/v1/providers/{npi}/enrollment
```

Medicare fee-for-service enrollments (PECOS) that list this NPI in CMS's public provider enrollment file, as the main NPI or one of an organization's additional NPIs: enrollment id, PECOS associate id, provider type, enrollment state and name. One NPI can hold several enrollments (one per state and provider type). `enrolled` is true when the current file lists one; enrollments a later file dropped stay with `status: retired`. Not listed means CMS's file has no enrollment with this NPI as of `data_version`, not a determination of eligibility. A well-formed NPI always answers 200.

Requires an API key: `Authorization: Bearer hdev_live_...`. See [Authentication](/authentication).

## Path parameters

| Name | Type | Required | Description | Example |
| --- | --- | --- | --- | --- |
| `npi` | string | yes | 10-digit National Provider Identifier | `1881018208` |

## Query parameters

| Name | Type | Required | Description | Example |
| --- | --- | --- | --- | --- |
| `view` | "compact" \| "standard" \| "full" | no | How much of each record to return (default `full`). `compact`: `enrollment_id`, `npi`, `provider_type`, `state`, `status` (fewest tokens, for agents). `standard`: every field except `replaced_by`. `full`: every field. | `compact` |
| `fields` | string | no | Comma-separated fields to return instead of a view. Valid fields: `enrollment_id`, `npi`, `additional_npis`, `pecos_associate_id`, `entity_type`, `provider_type_code`, `provider_type`, `state`, `name`, `status`, `effective_start`, `effective_end`, `replaced_by`. | `enrollment_id,npi,provider_type` |

## Examples

**curl**

```sh
curl "https://api.healthcare.dev/v1/providers/1881018208/enrollment" \
  -H "Authorization: Bearer $HDEV_API_KEY"
```

**TypeScript**

```ts
const res = await fetch("https://api.healthcare.dev/v1/providers/1881018208/enrollment", {
  headers: { Authorization: `Bearer ${process.env.HDEV_API_KEY}` },
});
const { data, meta } = await res.json();
```

**Python**

```python
import os
import requests

res = requests.get("https://api.healthcare.dev/v1/providers/1881018208/enrollment", headers={"Authorization": f"Bearer {os.environ['HDEV_API_KEY']}"})
body = res.json()
```

## Response

The NPI's enrollments

```json
{
  "data": {
    "npi": "string",
    "enrolled": true,
    "note": "string",
    "enrollments": [
      {
        "enrollment_id": "string",
        "npi": "string",
        "additional_npis": [
          null
        ],
        "pecos_associate_id": "string",
        "entity_type": "individual",
        "provider_type_code": "string",
        "provider_type": "string",
        "state": "string",
        "name": {
          "display": null,
          "first": null,
          "middle": null,
          "last": null,
          "organization": null
        },
        "status": "active",
        "effective_start": "2026-10-01",
        "effective_end": "2026-10-01",
        "replaced_by": [
          null
        ]
      }
    ]
  },
  "meta": {
    "source": "cms-icd10",
    "data_version": "2026.1",
    "retrieved_at": "2026-10-24T12:00:00Z",
    "license": "Public domain (CMS). Reference data, not medical advice."
  },
  "links": {
    "self": "/v1/providers/1881018208/enrollment",
    "next": null
  }
}
```

### Fields

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `npi` | string | yes |  |
| `enrolled` | boolean | yes | Whether CMS's current public enrollment file lists an enrollment with this NPI |
| `note` | string | yes | How the answer was matched, in plain words: show it with the data |
| `enrollments` | MedicareEnrollment[] | yes |  |

## Errors

Errors are `application/problem+json` ([RFC 9457](https://www.rfc-editor.org/rfc/rfc9457)). Branch on `type`, not on `title`. See [Errors](/errors).

| Status | `type` | When |
| --- | --- | --- |
| 400 | `invalid-request` | A parameter or the body failed validation; `errors` lists each field. |
| 401 | `unauthorized` | Missing, malformed or revoked API key. |
| 404 | `not-found` | No record with that id (retired records are still returned). |
| 429 | `rate-limited / quota-exceeded` | Too many requests per second (retry after `Retry-After`), or the monthly quota is used up. |
| 503 | `dataset-unavailable / unavailable` | The dataset has no published version yet, or the service is degraded. |
