DEV Community

Supreet Gupta
Supreet Gupta

Posted on

Getting a verified email for any US physician from an NPI number (REST API walkthrough)

If you build anything that touches US healthcare providers (recruiting tools, CRMs, referral platforms, clinical trial recruitment), you already have NPI numbers. NPPES gives you 7M+ Type 1 NPIs for free, with name, specialty and practice address. What it does not give you is a working email address.

We built an API for exactly that gap at Dmand AI. This post walks through how it works and what to expect. Full reference: docs.dmand.ai.

What it does

Submit a 10-digit Type 1 NPI, get back a verified email (professional, personal, or either), its type, and the timestamp it was last validated. Only emails verified within the last 30 days are returned. Anything older gets re-verified or looked up fresh, which takes 5 to 10 minutes.

Credits are charged only when an email is found. A lookup that fails or times out refunds its credit. Repeat lookups of the same NPI within 30 days are free.

Endpoints

Base URL: https://ext-api.dmand.ai, all paths under /api/v1. Auth is a Bearer API key from your account settings.

  • POST /api/v1/email submits one NPI
  • POST /api/v1/email/bulk submits up to 45 NPIs in one call
  • GET /api/v1/email/{request_id} polls a single lookup
  • GET /api/v1/batch/{batch_id} polls a batch

Submission returns 202 Accepted with a batch_id and one request_id per NPI. You then either poll or pass a webhook URL in the request and get results pushed when each NPI completes (or one callback for the whole batch).

The flow

# 1. Submit
curl -X POST https://ext-api.dmand.ai/api/v1/email/bulk \
  -H "Authorization: Bearer $DMAND_API_KEY" \
  -H "Content-Type: application/json" \
  -d @npis.json# -> 202 { "batch_id": "...", "requests": [ { "request_id": "..." }, ... ] }

# 2. Poll
curl https://ext-api.dmand.ai/api/v1/batch/$BATCH_ID \
  -H "Authorization: Bearer $DMAND_API_KEY"
# -> { "status": "completed", "data": [ ... ] }
Enter fullscreen mode Exit fullscreen mode

Exact request and response schemas are in the API docs. Cached NPIs come back in seconds. Fresh lookups land within 5 to 10 minutes, so design for async: write the request_id to your DB, use the webhook, and treat status: completed as the only terminal success state.

Why NPI and not name + employer

Matching people to employers by email domain breaks in healthcare. A health system can have hundreds of sites under one domain, and most physicians practice at more than one. The NPI is the one identifier that is stable across sites, employers and name changes, so keying enrichment on it avoids the false matches you get from name-based lookups.

Where the data comes from

The same database that powers the Dmand AI platform: 997K+ US sites of care mapped into health system hierarchies, with 7.4M+ HCPs and 11M+ healthcare executives affiliated at the site level. The API currently covers Type 1 (individual) NPIs only. Executive enrichment and non-NPI lookups are not yet supported through the API.

Questions or edge cases, reply here or email hello@dmand.ai.

Top comments (0)