In modern user onboarding, gathering data without friction is a balancing act. While verifying that an email address is reachable is a standard practice for maintaining list hygiene, enriching those profiles with visual signals—like public avatars—can significantly improve the user experience in collaborative or social-focused applications.
This tutorial demonstrates how to implement a conditional logic workflow that intelligently selects between a standard registration check and an avatar-enriched check based on the email domain.
Understanding the Signals
When verifying email addresses, it is important to distinguish between the two types of signals available:
-
Registration Signal (
email): Confirms if an email account is currently reachable at its provider. This is a time-specific signal reflecting the provider's status at the moment of the check. -
Public Avatar Signal (
email_avatar): Available exclusively for Gmail, Yandex, and Mail.ru families. When supported, this returns the registration status plus theavatarboolean andavatar_url.
Step 1: Define the Routing Logic
To optimize your API usage, you should only request avatar data for domains where it is supported. If you attempt an avatar check on an unsupported domain, the request will be rejected before the charge is applied.
// Conceptual: Domain-based routing
const supportedAvatarDomains = ['gmail.com', 'googlemail.com', 'yandex.ru', 'mail.ru', /* ... */];
function getServiceType(email) {
const domain = email.split('@')[1];
return supportedAvatarDomains.includes(domain) ? 'email_avatar' : 'email';
}
Step 2: Implementation Workflow
Using the /api/v1/check endpoint, you can normalize your integration by using the same request structure regardless of the service type.
The Request
Ensure you include your X-API-Key in the header. The payload structure remains consistent:
{
"service_type": "email_avatar",
"identifier": "example@gmail.com"
}
Processing the Response
Because the API returns a consistent schema, your downstream logic does not need complex branching for success or failure. If a domain does not support avatars, or if the registration check returns a negative result, the fields will simply return false or empty strings. You can safely parse these without writing custom error-handling branches for every outcome.
Step 3: Scaling with Batch Checks
For larger datasets, the /api/v1/batch-check endpoint allows you to process up to 100 addresses in a single HTTP request. This is a synchronous operation, meaning you receive the full set of results (including registration signals and avatar URLs where applicable) in one response, eliminating the need for complex polling or task management.
Important Considerations
-
Signal Scope: A
registered: trueresult is a reachability signal at the time of the check. It does not guarantee future account status, inbox placement, or ownership of the account. - Avatar Usage: Public avatar availability is not proof of identity or permission to reuse the image. Always ensure your application's use of retrieved URLs complies with relevant privacy guidelines.
- Handling "Catch-All" Domains: If a domain is marked as a catch-all, the API returns an undetermined result. These are not counted as invalid, and the cost for these specific checks is returned.
Conclusion
By implementing a simple routing layer, you can effectively upgrade your user registration flow. Use standard registration checks to maintain high-quality data across all domains, and selectively enable avatar retrieval for supported providers to add a layer of visual context to your user profiles. For full technical specifications, refer to the official API documentation.
This article was drafted with AI assistance and reviewed before publishing.













