Skip to main content

API error codes and how to fix them

What the 400, 401, 402, 429 and 500 errors of the Enrow API mean, how to fix each one, and which ones to retry.

Written by Thomas Lucy

Most API errors come from a missing field (400), a wrong API key (401), too few credits (402) or too many requests at once (429). Retry only the 429 and 500 errors. For the others, fix the request first: sending it again won't help.

Errors come with a short JSON message, for example {"message": "This apikey is not valid"}. The only exception is the 402 error on single searches, which returns {"reason": "Insufficient credits", "success": false}. Base your code on the HTTP status code, not on the text of the message.

400: a field is missing or wrong

Common messages:

  • "missing fullname"

  • "both company_domain and company_name are absent, input payload needs at least one of them"

  • "Invalid linkedin_url format"

  • "Too many searches. Limit is currently at 5000 per batch."

  • "invalid JSON input"

What to do: check the fields of your request against What to send: inputs for email and phone searches. Split batches that are too large. Check that your JSON is valid.

On a bulk GET endpoint, a 400 error can also mean that the batch id is unknown or has expired (results are kept 3 months).

401: the API key is missing or invalid

  • "No apikey found in the x-api-key headers": the key isn't where the API expects it. Send it in a header named exactly x-api-key, with no spaces. Don't use the Authorization header or a "Bearer" token.

  • "This apikey is not valid": the key is wrong or incomplete, or it was reset and the old key no longer works. Copy the current key from the API page of the app.

If the key is correct, check that your account still has API access. See API access: which plans include it and how to test the API.

402: not enough credits

Message: "Insufficient credits". Your balance is too low for the request.

  • For a bulk request, your balance must cover the whole batch when you send it, as if every row found a result. The credits of rows without a result are refunded at the end.

  • While your subscription is paused, your subscription credits are frozen. Only your pay-as-you-go credits can be used. If you have none left, the API returns this error.

What to do: check your balance with GET /account/info, then renew your plan or buy credits from Billing. To avoid this error, set up a low-credit alert or automatic top-up. See API credits: how searches are charged and how to track your balance.

Note: Some older tools mention a 422 "Insufficient balance" error. It was the former code for missing credits. The API now returns 402.

429: too many requests

Message: "Too Many Requests". You sent more than 10 requests per second to the same endpoint with your API key.

What to do: wait, then retry with longer and longer delays (for example 1, 2, then 4 seconds). The API doesn't tell you how long to wait. To send fewer requests, use bulk endpoints and webhooks. See Rate limits, batch sizes and response times.

500: an error on Enrow's side, or an unknown id

  • "An unexpected error occurred": something went wrong on Enrow's side. Searches that fail because of a problem on Enrow's side are never charged.

  • "Could not retrieve single search results" (or "single verification results"): on a single GET endpoint, the id is unknown or has expired. Check the id.

What to do: retry after a short wait, with longer and longer delays. If the error continues, contact support.

Get alerted when calls fail

The API calls declined alert tells you when API requests fail because you don't have enough credits or your subscription is paused. You get it at most once a week, by email, Slack or Discord. Turn it on in Profile > Notifications.

Contact support

If an error continues, write to us through the chat or at [email protected]. Include the endpoint, the date and time, the HTTP code, the message, and the id of the search if you have one. Never send your API key.

Related articles

Did this answer your question?