View as Markdown

Errors

All v2 endpoints use conventional HTTP status codes and a consistent JSON envelope.

StatusMeaning
200Success
400Bad request - validation failed; the response body lists the offending fields
401Unauthorized - missing or invalid x-api-key header
402Payment required - not enough credits or wallet, or a paid plan is needed (paid_plan_required)
408Request timeout - the lookup took too long; safe to retry
429Too many requests - a plan rate limit, a background job that does not fit today's limit, too many concurrent searches, or the demo account cap; retry after Retry-After when it is sent
5xxServer error - safe to retry with exponential backoff

Error responses share one envelope shape: success is false and errors is an array of { name, message } objects (validation errors also carry a payload with the offending field). data is usually null, with one exception noted below.

"Not found" results are HTTP 200, not 404

People Enrich, Company Enrich, and Email Finder return a well-formed 200 response with success: false and errors: [{ "name": "NOT_FOUND", ... }] when a valid, well-formed request simply finds no match - there is no dedicated 404 for this case. Email Finder's not-found response also keeps a non-null data object (email: null plus whatever domain information was resolved). Check success and errors, not the HTTP status, to detect a miss.

400 - Bad request

Each failing field gets its own entry in errors, named VALIDATION_ERROR, with the offending field's full path in payload.field. payload.code says what kind of mistake it is - always check the code, not only the name. Every 400 a search can return carries a payload.code and payload.field, including the rules the service itself checks (a missing include filter, a boolean_search syntax error, a malformed LinkedIn URL, a location that cannot be resolved). Messages lead with the full field path and may be reworded over time, so switch on payload.code, never on the message text:

payload.codeMeaningExtra payload fields
unknown_fieldThe field does not exist on this endpointdid_you_mean (when close), allowed_fields
value_not_allowedA value is outside the field's closed vocabularyinvalid_values, suggested_values (when close), allowed_values, enum
missing_fieldA required field is absent or empty
wrong_typeThe value has the wrong type (for example a string page)
out_of_rangeA number, length or list size is outside its boundsinvalid_values (when one list item is the culprit)
invalid_formatA string does not match the expected format (id, URL, ...)invalid_values (list items), position (boolean_search)
conflicting_fieldsTwo fields that mean the same thing were both sent
invalid_valueAny other rule the value breaksinvalid_values, suggested_values (locations, LinkedIn URLs)

For value_not_allowed, allowed_values lists the whole vocabulary when it is short. When the vocabulary is one of the enums (seniorities, industries, departments, ...), enum names it, and large ones such as industries are not inlined - read them from GET /v2/enums/<enum> instead.

Fix hints in the payload

Besides saying what is wrong, a 400 points at the fix:

payload memberAppears onWhat it holds
did_you_meanunknown_fieldA single field path (a string) you probably meant. It can point one level up or down, for example max_person_per_company gives filters.max_person_per_company, and company_domain gives filters.company.domain.
suggested_valuesvalue_not_allowed, and invalid_value on person_location / company_location[{ "value": <the value you sent>, "suggestions": [...] }]. Only values that have a likely replacement are listed (at most 5 entries). Each suggestion can be sent as-is.
invalid_valuesvalue_not_allowed, invalid_value, and per-item out_of_range, invalid_format and wrong_type failuresThe exact values that were refused, so a long list does not leave you guessing which item failed. Long strings are cut to 500 characters.
positioninvalid_format on boolean_searchThe 0-based character offset in the expression where parsing failed.

A wrong_type message ends with an example of an accepted value (- send ["51-200","201-500"]), and a field sent with the wrong shape produces one entry, not one per nested key.

The example below sends People Search a misspelled seniority and a misspelled company field:

Response
{
  "success": false,
  "data": null,
  "metadata": {
    "timestamp": "2026-10-02T09:00:00.000Z"
  },
  "errors": [
    {
      "name": "VALIDATION_ERROR",
      "message": "filters.person_seniority.include: \"Mangaer\" is not an accepted value - did you mean \"Manager\"? Accepted: Owner, C-Suite, Partner, VP, Head, Director, Manager, Senior, Mid-level, Entry, Intern, Unpaid; the accepted values are listed at GET /v2/enums/seniorities",
      "payload": {
        "field": "filters.person_seniority.include",
        "code": "value_not_allowed",
        "received_value": [
          "Mangaer"
        ],
        "received_type": "object",
        "invalid_values": [
          "Mangaer"
        ],
        "suggested_values": [
          {
            "value": "Mangaer",
            "suggestions": [
              "Manager"
            ]
          }
        ],
        "allowed_values": [
          "Owner",
          "C-Suite",
          "Partner",
          "VP",
          "Head",
          "Director",
          "Manager",
          "Senior",
          "Mid-level",
          "Entry",
          "Intern",
          "Unpaid"
        ],
        "enum": "seniorities",
        "constraints": {
          "isIn": "each value in include must be one of the following values: Owner, C-Suite, Partner, VP, Head, Director, Manager, Senior, Mid-level, Entry, Intern, Unpaid"
        }
      }
    },
    {
      "name": "VALIDATION_ERROR",
      "message": "filters.company.domainz is not a field of this request - did you mean filters.company.domain?",
      "payload": {
        "field": "filters.company.domainz",
        "code": "unknown_field",
        "received_value": {
          "include": [
            "stripe.com"
          ]
        },
        "received_type": "object",
        "did_you_mean": "filters.company.domain",
        "allowed_fields": [
          "id",
          "domain",
          "name",
          "linkedin_id"
        ],
        "constraints": {
          "whitelistValidation": "property domainz should not exist"
        }
      }
    }
  ]
}

Location errors

person_location and company_location take place names, and only names that resolve to a real place are accepted. When one does not, the entry is an invalid_value that lists the refused strings in invalid_values and, where a nearby place exists, the closest real ones in suggested_values. The same applies when only some of the values resolve (the entry names the ones that did not).

Response
{
  "success": false,
  "data": null,
  "metadata": {
    "timestamp": "2026-10-23T09:00:00.000Z"
  },
  "errors": [
    {
      "name": "VALIDATION_ERROR",
      "message": "filters.company_location.include: none of the provided locations could be resolved (\"Nowhere at all\") - did you mean \"Nowhere, Texas, United States\"? Look values up with POST /v2/search/suggest {\"type\": \"location\", \"query\": \"...\"} and send a suggestion's value as-is.",
      "payload": {
        "code": "invalid_value",
        "field": "filters.company_location.include",
        "invalid_values": [
          "Nowhere at all"
        ],
        "suggested_values": [
          {
            "value": "Nowhere at all",
            "suggestions": [
              "Nowhere, Texas, United States"
            ]
          }
        ]
      }
    }
  ]
}

Look places up with POST /v2/search/suggest (type: "location") and send the value of a suggestion exactly as returned: every suggested value is accepted by the location filters, territories included.

Rules the service checks

A few rules are checked after the request body is parsed. They use the same VALIDATION_ERROR entry with a payload.code and payload.field:

Mistakepayload.codepayload.fieldNotes
No include filter on a searchmissing_fieldfiltersThe message includes an example include filter.
Too many values across the filtersout_of_rangefilters
boolean_search syntax errorinvalid_formatfilters.person_job_title.boolean_searchposition is the 0-based offset of the problem.
Malformed LinkedIn URLs in filters.person.linkedin_urlinvalid_valuefilters.person.linkedin_url.includeinvalid_values lists exactly the URLs that failed, not just the first.
Response
{
  "success": false,
  "data": null,
  "metadata": {
    "timestamp": "2026-10-23T09:00:00.000Z"
  },
  "errors": [
    {
      "name": "VALIDATION_ERROR",
      "message": "filters.person_job_title.boolean_search: unexpected trailing token (check parentheses and operators) at offset 9 (\"director\"). Quote multi-word terms ('managing director'), parenthesise when mixing AND and OR, and use backticks for words in order (`vp marketing`).",
      "payload": {
        "code": "invalid_format",
        "field": "filters.person_job_title.boolean_search",
        "position": 9
      }
    }
  ]
}

Fixing a 400 automatically

An integration, or an AI agent calling the API, can repair most 400s without a human by following the payload. Retrying the same body never helps, so change it first:

  1. Read errors[].payload.code and payload.field. Never parse the message.
  2. unknown_field: replace the field with did_you_mean when present, otherwise pick one from allowed_fields.
  3. value_not_allowed: for each entry in suggested_values, replace value with the first item of suggestions. For values with no suggestion, choose from allowed_values, or from GET /v2/enums/<enum> when enum is set and the list is not inlined.
  4. invalid_value on a location filter: replace the refused strings with suggested_values, or look the place up with POST /v2/search/suggest (type: "location") and send the returned value. Open-ended filters such as location, job_title and industry are looked up this way; closed vocabularies come from GET /v2/enums/<enum>.
  5. wrong_type: reshape the value as the example at the end of the message shows.
  6. invalid_format with position: fix the boolean_search expression at that offset.
  7. out_of_range, invalid_format or invalid_value with invalid_values: drop or correct exactly those items and keep the rest.
  8. missing_field: add the named field (for a search, at least one include filter).

Repeat at most a few times, and stop if the same payload.code returns for the same payload.field.

401 - Unauthorized

Returned when the x-api-key header is missing or invalid.

Response
{
  "success": false,
  "data": null,
  "metadata": {
    "timestamp": "2026-06-18T09:12:44.000Z"
  },
  "errors": [
    {
      "name": "UNAUTHORIZED",
      "message": "Unauthorized"
    }
  ]
}

402 - Payment required

Creating a workspace (POST /v2/workspaces) needs a paid-plan workspace among the caller's workspaces, and inviting teammates needs the current workspace to be on a paid plan. Otherwise they answer 402 with payload.code paid_plan_required and an upgrade_url. Both are App-session routes, so a call made with an API key does not meet this 402:

Response
{
  "success": false,
  "data": null,
  "metadata": {
    "timestamp": "2026-11-24T14:02:31.000Z"
  },
  "errors": [
    {
      "name": "PAYMENT_REQUIRED",
      "message": "Adding workspaces is available on paid plans. Upgrade your plan to add a workspace: https://app.getprospect.com/settings/subscription",
      "payload": {
        "code": "paid_plan_required",
        "upgrade_url": "https://app.getprospect.com/settings/subscription"
      }
    }
  ]
}

Otherwise, a 402 means credits ran out:

Returned once your workspace's credit balance reaches zero, before the request is even processed. The response also sets two headers: X-Limit-Reached: true and X-Limit-Type: credits.

Response
{
  "success": false,
  "data": null,
  "metadata": {
    "timestamp": "2026-07-25T14:02:31.000Z"
  },
  "errors": [
    {
      "name": "PAYMENT_REQUIRED",
      "message": "Workspace has reached its credit limit"
    }
  ]
}

Some endpoints also run a narrower pre-flight check against the specific credit type a request would spend (for example People Search only checks email credits when you pass enrich_email: true), which fails the same way with a more specific message such as "Insufficient email credits: have 0, need 3".

Phone numbers and email verifications are paid from the wallet. When the wallet cannot cover one, and auto top-up is off or its charge fails, the 402 says how much is missing. payload carries the figures in USD:

FieldDescription
needed_usdWhat the request needs from the wallet.
available_usdWhat the wallet holds now.
top_up_urlThe Top up dialog in the app, where the wallet is topped up.
Response
{
  "success": false,
  "data": null,
  "metadata": {
    "timestamp": "2026-11-02T14:02:31.000Z"
  },
  "errors": [
    {
      "name": "PAYMENT_REQUIRED",
      "message": "Not enough in your wallet: needs $8.00, you have $3.20",
      "payload": {
        "needed_usd": 8,
        "available_usd": 3.2,
        "top_up_url": "https://app.getprospect.com/settings/subscription?top_up=1"
      }
    }
  ]
}

A 402 is stored against the Idempotency-Key it answered, so after a top-up retry with a new Idempotency-Key.

408 - Request timeout

Email Finder and Email Verifier return 408 when the underlying lookup takes too long. Retry after a short delay.

Response
{
  "success": false,
  "data": null,
  "metadata": {
    "timestamp": "2026-07-25T14:02:31.000Z"
  },
  "errors": [
    {
      "name": "TIMEOUT",
      "message": "Email search is taking longer than expected. Please retry your request in a few minutes."
    }
  ]
}

429 - Too many requests

People Search and Company Search answer 429 with TOO_MANY_CONCURRENT_REQUESTS when a workspace already has 26 searches running and no slot frees up within 5 seconds (see Credits and limits). The response carries Retry-After: 1: retry after that delay, and keep parallel searches bounded.

Response
{
  "success": false,
  "data": null,
  "metadata": {
    "timestamp": "2026-10-28T14:02:31.000Z"
  },
  "errors": [
    {
      "name": "TOO_MANY_CONCURRENT_REQUESTS",
      "message": "Too many concurrent searches: at most 26 may run at once per workspace"
    }
  ]
}

A request over your plan's rate limit, or a background job that needs more units than are left today, answers 429 with the error name RATE_LIMIT. Request-level answers carry Retry-After; a job refusal carries payload.code (rate_limit_exceeded or job_exceeds_plan_limit) and payload.reset_seconds instead. A Free workspace over its monthly search or enrich limit (and a Limited workspace, which has none) gets payload.code monthly_limit_reached with window, bucket, plan, limit, reset_at and upgrade_url, and Retry-After set to the seconds until the reset; a background job refused for the month uses rate_limit_exceeded or job_exceeds_plan_limit with window: "month". See Rate limits.

The shared demo account is also capped at 1500 requests per hour per requesting IP address, and gets RATE_LIMIT once the cap is exceeded:

Response
{
  "success": false,
  "data": null,
  "metadata": {
    "timestamp": "2026-07-25T14:02:31.000Z"
  },
  "errors": [
    {
      "name": "RATE_LIMIT",
      "message": "Demo user requests limit"
    }
  ]
}

5xx - Server error

Returned when a downstream dependency is unavailable - for example, People Search and Company Search return 500 with this message when the search backend can't be reached. Safe to retry with exponential backoff.

Response
{
  "success": false,
  "data": null,
  "metadata": {
    "timestamp": "2026-07-25T14:02:31.000Z"
  },
  "errors": [
    {
      "name": "INTERNAL_ERROR",
      "message": "Search backend unavailable"
    }
  ]
}

An unexpected, unhandled error (rather than one the API explicitly detected and reported) returns the same 500 / INTERNAL_ERROR shape with a generic "Internal server error" message instead, so as not to leak internal details.