How to integrate OhBounce.ai into your sign-up flow in 10 minutes
Stop invalid emails from ever entering your database. We walk through adding real-time validation to your registration form using the REST API — with code examples for React, Next.js, and plain HTML.
Every invalid email that slips past your sign-up form is a problem that compounds. It inflates your list, skews your analytics, and eventually triggers a hard bounce that hurts your sender reputation. The good news: blocking them at the point of entry takes less than ten minutes with the OhBounce.ai API.
Step 1: Get your API key
Head to the Developers section of your OhBounce.ai dashboard and create a new API key. Give it a descriptive name like 'sign-up-form' and leave the expiry set to Never for a long-lived key. Copy it somewhere safe — you'll only see it once.
Step 2: Call the validation endpoint on blur
The most effective place to validate is when the user moves focus away from the email field — not on form submit. This gives real-time feedback without feeling intrusive. Make a POST request to https://ohbounce.ai/api/v1/validate with the email in the body. The response comes back in under a second.
Validate on blur, not on submit. Users expect instant feedback when they finish typing — not after clicking a button.
Step 3: Act on the response
Check the status field in the response. If it's VALID, allow the form to proceed. If it's INVALID or DISPOSABLE, show an inline error and disable the submit button. For CATCH_ALL or UNKNOWN, you might choose to allow sign-up but flag the address internally for a follow-up verification email. The didYouMean field is especially useful — if the API returns a suggestion, display it as a 'Did you mean?' prompt.
- VALID — allow submission
- INVALID — show error: 'This email address doesn't exist.'
- DISPOSABLE — show error: 'Please use a permanent email address.'
- CATCH_ALL / UNKNOWN — allow with internal flag for follow-up
Handling latency
OhBounce.ai median response time is under 50ms, but occasional SMTP probes can take up to 1.5 seconds on slow-responding servers. Show a small spinner in the email field during validation and keep the submit button disabled until you have a result. This also prevents the user from submitting before validation completes.
That's it. Ten minutes of integration work pays off every day in cleaner lists, better open rates, and fewer ESP headaches.