# API-Based Email Validation in a Hubspot form

**URL:** <https://community.hubspot.com/t/api-based-email-validation-in-a-hubspot-form/122787>\
**Category:** APIs & Integrations\
**Tags:** free\
**Created:** [December 19, 2024, 8:41am UTC](https://community.hubspot.com/t/api-based-email-validation-in-a-hubspot-form/122787 "2024-12-19T08:41:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boomika](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@Boomika](https://community.hubspot.com/u/Boomika)\
**Post date:** [December 19, 2024, 8:41am UTC](https://community.hubspot.com/t/api-based-email-validation-in-a-hubspot-form/122787/1 "2024-12-19T08:41:52Z")

</div>

I’m working on a project where I need to check if a user-entered email exists in the submissions of a specific HubSpot form. Currently, my approach involves fetching all the form submissions and validating the entered email against the retrieved data. However, this method takes too long to respond.

Is there an API call that allows me to pass the user email directly in the URL and validate it efficiently, instead of fetching all the submissions?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [December 19, 2024, 6:03pm UTC](https://community.hubspot.com/t/api-based-email-validation-in-a-hubspot-form/122787/2 "2024-12-19T18:03:01Z")

</div>

Hey, @Boomika 👋 I don’t have “the” solution. But I do have some clarifying questions 😊

- are you querying “all” forms each time? Or only a specific form?
- do you need additional contact information beyond knowing if the email exists in submissions?
- what is the current response time for your queries? What would be an acceptable or “better” response time?

Without knowing more details, my back of the napkin approach might be:

- Query the Search API to verify if the contact exists
- If yes, then search the specific Form for submissions

The other option you can explore is seeing if you can do this via [**GraphQL**](https://developers.hubspot.com/docs/guides/cms/content/data-driven-content/graphql/query-hubspot-data-using-graphql). This would (requires testing) be the only way to make these requests in a single unified call. Otherwise, we’ll need an approach like what you are already doing — some combination of at least two calls.

Talk soon! — Jaycee

---

<div class="post-metadata">

**Author:** ![Boomika](https://avatars.discourse-cdn.com/v4/letter/b/f19dbf/32.png) [@Boomika](https://community.hubspot.com/u/Boomika)\
**Post date:** [December 20, 2024, 6:03am UTC](https://community.hubspot.com/t/api-based-email-validation-in-a-hubspot-form/122787/3 "2024-12-20T06:03:42Z")

</div>

Hey Jaycee,  
Thanks for the questions!  
I’m fetching data from a **specific form** only, and I don’t need any  
additional contact information—just verifying if the email exists in  
submissions. Currently, the response time is around a minute since I’m  
dealing with ~2 lakh records, but I’m hoping to bring it down to just a  
few seconds.  
I agree that searching the contacts for the email first and then fetching  
form submissions sounds promising, especially when the email doesn’t  
exist. However, in cases where the email does exist, this approach would  
involve two API calls, which might actually increase the response time  
further.  
Let me know if you’ve encountered a more efficient workaround!
