> For the complete documentation index, see [llms.txt](https://docs.coresignal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coresignal.com/api-introduction/response-codes.md). Agents can also search and read this documentation through its [MCP server](https://docs.coresignal.com/~gitbook/mcp).

# Response Codes

Complete reference for all Coresignal API response codes – covering Search, Collect, Bulk Collect, Webhooks, and the Real-time Employee API.

## Overview

Explore the various possible response codes and their meanings.

These error codes can be encountered in all:

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th></tr></thead><tbody><tr><td><a href="#search-and-collect-response-codes">Search and collect response codes</a></td><td>Codes received with Elasticsearch DSL, Search filters, and Collect endpoints</td></tr><tr><td><a href="#bulk-collect-response-codes">Bulk Collect response codes</a></td><td>Codes received with Bulk Collect endpoints</td></tr><tr><td><a href="#subscriptions-response-codes">Webhook (subscriptions) response codes</a></td><td>Codes received with Webhook subscription endpoints</td></tr><tr><td><a href="https://docs.coresignal.com/api-introduction/response-codes.md#real-time-api-response-codes">Real-time Employee API response codes</a></td><td>Codes received with Real-time Employee API endpoint</td></tr></tbody></table>

## Search and collect response codes

<table data-search="false"><thead><tr><th>Response code</th><th>Description</th></tr></thead><tbody><tr><td> <code>200</code></td><td>A successful request. Credits are deducted.</td></tr><tr><td> <code>400</code></td><td>Request was unacceptable, often due to a missing required parameter. </td></tr><tr><td><code>401</code></td><td>No valid API Key was provided. Check if your key is valid and try again.</td></tr><tr><td><code>402</code></td><td>Insufficient credits. Contact your account manager to get more credits.</td></tr><tr><td><code>403</code></td><td>The service is unavailable for your API key. Verify that the correct team/API key is being used.</td></tr><tr><td><code>404</code></td><td><p>Several cases can cause the error:</p><ul><li>Nonexistent API URL</li><li>Nonexistent ID: Using a profile ID that does not exist in our database</li></ul></td></tr><tr><td><code>422</code></td><td>Incorrect data structure or data types are provided in the request.</td></tr><tr><td><code>429</code></td><td>Endpoint <a href="https://docs.coresignal.com/api-introduction/rate-limits.md">rate limit</a> has been exceeded.<br>All API endpoints restrict the number of requests allowed per second for each client's API Key.</td></tr><tr><td><code>500</code></td><td>Code <code>500</code> denotes server issues. One possible example is that the wrong request type was selected (POST/GET).</td></tr><tr><td><code>502</code></td><td>Bad gateway.</td></tr><tr><td><code>503</code></td><td><p><code>503</code> can be returned in the following cases:</p><ul><li>Search did not finish within 10 seconds</li><li>Search service is under heavy load</li><li>Search service is temporarily unavailable</li></ul></td></tr></tbody></table>

### Why am I getting `503` error?

If you get a `503` error, your search request comes with a `detail` message notifying you what happened exactly.&#x20;

| Detail                                                                                                                | What it means                                                                                                                | Next steps                                                                                                                      |
| --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Search did not finish within 10 seconds. Retry after a few seconds. If it keeps happening, try simplifying the query. | Your query took longer than the 10-second limit. This usually means the query is too heavy to run, not that the API is down. | Retry once. If it keeps failing, simplify the query (see "[What makes a query resource-heavy](#what-makes-a-query-expensive)"). |
| Search service is under heavy load. Retry later.                                                                      | The search service is busy. Your query is not the problem.                                                                   | Retry later. No need to change the query.                                                                                       |
| Search service is temporarily unavailable. Retry later.                                                               | The search service had a temporary problem. Your query is not the problem.                                                   | Retry later. No need to change the query.                                                                                       |

#### **Why a query goes over a limit?**

Every search request has 10 seconds to finish. If the request is not completed within this time, it is stopped and `503` error is returned. Depending on how busy the service is, the same query may succeed on one attempt and fail on the next.

#### **What makes a query resource-heavy?**

There are two main aspects that may make the query resource-heavy:

* **Wildcards at the start of the value**. A value starting with \* (like \*engineer\*) makes Elasticsearch check every value stored in that field. A single leading wildcard is enough to slow a query down. Better to use `match`, which finds the word anywhere in the title and runs much faster.
* **Long lists of fuzzy or phrase matches**. Each `"fuzziness": "AUTO"` clause also matches misspellings, so Elasticsearch compares your term against many similar values, while  `match_phrase` clause checks that words appear together in the right order. Try to use only a few at a time; avoid long lists and repeating the same conditions.

To keep these queries fast:

* Shorten the list to the titles that matter most
* Instead of relevance scoring across many nested fields, opt for conditions in `filter`, which are not scored, so they run faster&#x20;
* Use fuzziness only where spelling actually varies, not on titles you have typed out yourself
* For exact values, use one `terms` clause on the `.exact` field instead of many phrase clauses:

{% code expandable="true" %}

```json
{"terms": {"experience.title.exact": ["Territory Manager", "Account Manager", "Sales Representative"]}}
```

{% endcode %}

#### What to do when you get a `503` response?

Try the following steps if you get a `503` response:

* Wait for the number of seconds in the `Retry-After` response header, then retry once. A query close to the limit often succeeds on a second attempt. Retrying immediately, or many times, adds load and makes further timeouts more likely.
* If the detail says the search did not finish within 10 seconds and it keeps failing, simplify the query using the points above. Start with any leading wildcards and long lists of fuzzy or phrase clauses.
* If a simplified query still fails, contact support and include the request body.

## Bulk Collect response codes

<table data-search="false"><thead><tr><th>Response codes</th><th>Description</th></tr></thead><tbody><tr><td><code>201</code></td><td>A successful request. </td></tr><tr><td><code>202</code></td><td>The process is in progress.</td></tr><tr><td><code>400</code></td><td>Indicates incorrectly formatted or oversized files or invalid data.</td></tr><tr><td><code>402</code></td><td>Insufficient credits. Reduce your request size or contact your account manager to get more credits.</td></tr><tr><td><code>404</code></td><td>Request did not find any matching IDs.</td></tr><tr><td><code>409</code></td><td>Duplicate POST requests were submitted.</td></tr><tr><td><code>422</code></td><td><ul><li>Request exceeded the limit of 10k IDs</li><li>The provided URLs cannot be parsed into shorthand names</li><li>Input does not meet the <code>shorthand_names</code> requirements</li><li>Request input includes duplicates</li></ul></td></tr><tr><td><code>503</code></td><td>Collect allows you to download the prepared dataset as often as you like within 30 days of submitting the query.<br>After 30 days of query submission, the GET query will return a <code>404</code> response code.</td></tr></tbody></table>

## Subscriptions response codes

### ID endpoint response codes

<table data-search="false"><thead><tr><th>Response code</th><th>Description</th></tr></thead><tbody><tr><td><code>200</code></td><td>A successful request.</td></tr><tr><td><code>400</code></td><td><ul><li>Error codes indicate failures due to incorrectly formatted or oversized files or invalid data.</li><li>The subscription has already expired.</li><li>Renewing a subscription would push the expiry date over 1 year away.</li></ul></td></tr><tr><td><code>401</code></td><td>No valid API Key was provided. Check if your key is valid and try again.</td></tr><tr><td><code>404</code></td><td>Subscription doesn’t exist or doesn’t belong to the user</td></tr><tr><td><code>409</code></td><td>Subscription was just created and hasn’t finished initialising</td></tr><tr><td><code>422</code></td><td>The webhook URL you provided is invalid.</td></tr><tr><td><code>5xx</code></td><td>Unable to create subscription due to a server error.</td></tr></tbody></table>

### Search Filter and Elasticsearch DSL endpoint response codes

| Response code | Description                                                                                                                                                                                                                                               |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `200`         | A successful request. Credits are deducted.                                                                                                                                                                                                               |
| `400`         | The request was unacceptable, often due to a missing required parameter.                                                                                                                                                                                  |
| `401`         | No valid API Key was provided. Check if your key is valid and try again.                                                                                                                                                                                  |
| `422`         | <p>There are two possible reasons for the <code>422</code> error code:</p><ol><li>The webhook URL you provided is invalid</li><li>You have used incompatible filters (such as any date filter from search filters or Elasticsearch DSL schema).</li></ol> |

## Real-time Employee API response codes <a href="#real-time-api-response-codes" id="real-time-api-response-codes"></a>

<table data-search="false"><thead><tr><th>Response code</th><th>Description</th></tr></thead><tbody><tr><td><code>200</code></td><td>A successful request. Credits are deducted.</td></tr><tr><td><code>400</code></td><td>The request was unacceptable, often due to a missing required parameter.</td></tr><tr><td><code>402</code></td><td>Insufficient credits.</td></tr><tr><td><code>408</code></td><td>Response timeout. Credits are not deducted for this request. You can try sending the request again.</td></tr><tr><td><code>422</code></td><td><p>Incorrect data structure or data types were provided in the request. Unprocessable content:</p><ul><li>Invalid URL</li><li>Invalid cache age</li></ul></td></tr><tr><td><code>454</code></td><td>Profile was missing, removed, or made private during the most recent scrape. Credits are not deducted.</td></tr><tr><td><code>503</code></td><td>Something went wrong on the API side. You will get a Bad gateway error message if you have selected the wrong request type.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coresignal.com/api-introduction/response-codes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
