<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Supreet Gupta</title>
    <description>The latest articles on DEV Community by Supreet Gupta (@supreetgupta).</description>
    <link>https://dev.to/supreetgupta</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4224924%2Fc8c9ef13-9014-47bc-a248-e40bdcdadc7d.png</url>
      <title>DEV Community: Supreet Gupta</title>
      <link>https://dev.to/supreetgupta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/supreetgupta"/>
    <language>en</language>
    <item>
      <title>Getting a verified email for any US physician from an NPI number (REST API walkthrough)</title>
      <dc:creator>Supreet Gupta</dc:creator>
      <pubDate>Sat, 07 Nov 2026 11:27:01 +0000</pubDate>
      <link>https://dev.to/supreetgupta/getting-a-verified-email-for-any-us-physician-from-an-npi-number-rest-api-walkthrough-5g9b</link>
      <guid>https://dev.to/supreetgupta/getting-a-verified-email-for-any-us-physician-from-an-npi-number-rest-api-walkthrough-5g9b</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;We built an API for exactly that gap at &lt;a href="https://dmand.ai" rel="noopener noreferrer"&gt;Dmand AI&lt;/a&gt;. This post walks through how it works and what to expect. Full reference: &lt;a href="https://docs.dmand.ai/" rel="noopener noreferrer"&gt;docs.dmand.ai&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Endpoints
&lt;/h2&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;POST /api/v1/email&lt;/code&gt; submits one NPI&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;POST /api/v1/email/bulk&lt;/code&gt; submits up to 45 NPIs in one call&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET /api/v1/email/{request_id}&lt;/code&gt; polls a single lookup&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET /api/v1/batch/{batch_id}&lt;/code&gt; polls a batch&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Submission returns &lt;code&gt;202 Accepted&lt;/code&gt; with a &lt;code&gt;batch_id&lt;/code&gt; and one &lt;code&gt;request_id&lt;/code&gt; 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).&lt;/p&gt;

&lt;h2&gt;
  
  
  The flow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# 1. Submit&lt;/span&gt;
curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST https://ext-api.dmand.ai/api/v1/email/bulk &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$DMAND_API_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; @npis.json# -&amp;gt; 202 &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"batch_id"&lt;/span&gt;: &lt;span class="s2"&gt;"..."&lt;/span&gt;, &lt;span class="s2"&gt;"requests"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt; &lt;span class="s2"&gt;"request_id"&lt;/span&gt;: &lt;span class="s2"&gt;"..."&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;, ... &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# 2. Poll&lt;/span&gt;
curl https://ext-api.dmand.ai/api/v1/batch/&lt;span class="nv"&gt;$BATCH_ID&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$DMAND_API_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="c"&gt;# -&amp;gt; { "status": "completed", "data": [ ... ] }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exact request and response schemas are in the &lt;a href="https://docs.dmand.ai/" rel="noopener noreferrer"&gt;API docs&lt;/a&gt;. Cached NPIs come back in seconds. Fresh lookups land within 5 to 10 minutes, so design for async: write the &lt;code&gt;request_id&lt;/code&gt; to your DB, use the webhook, and treat &lt;code&gt;status: completed&lt;/code&gt; as the only terminal success state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why NPI and not name + employer
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the data comes from
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Questions or edge cases, reply here or email &lt;a href="mailto:hello@dmand.ai"&gt;hello@dmand.ai&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>api</category>
      <category>healthcare</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
