What is a 202 Status Code?
Last Updated: March 9, 2023
What does this 202 Status mean?
A 202 status code means that your lookup is queued and Clearbit has pushed it to the backlog to retry when a response is available. Many times you'll see 202s when an email or domain hasn't been looked up in Clearbit's databases in quite some time, or when the emails or domains are new. This is not an error but instead a way for us to handle responses that need to be looked up asynchronously.
When using our API directly, if your code does not account for it, status 202s will not automatically try again. In this case, we recommend the following options:
(1) Retry the call after a few minutes. When you retry a call Clearbit reindexes the email/domain and should result in a 200.
(2) Use our Streaming API, which will keep a connection open for up to 1 minute for any requests that result in status 202. To use our streaming API, simply make your requests to the subdomain person-stream.clearbit.com rather than person.clearbit.com.
Please be aware using the Streaming API leads to slow Enrichment results. More information is available in our API docs.
(3) Pass in the parameter 'cached' set to 'true' in your call.
This would return the cached JSON response right away. The downside to this is that the data may be a bit outdated because status 202 implies that it's been some time since that email/domain was enriched so the cached response could be outdated.
(4) Set up a webhook in the Clearbit Dashboard > API tab to receive the response when it's made available. More information here.
A benefit of using Clearbit's integrations is 202s are reran through the package automatically, there is nothing you need to do. For the Salesforce Managed Package, there is an APEX job that runs automatically to enrich any records with 202s.