Scroll over all companies

The list all companies functionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply. The Scroll API provides an efficient mechanism for iterating over all companies in a dataset.

  • Each app can only have 1 scroll open at a time. You'll get an error message if you try to have more than one open per app.
  • If the scroll isn't used for 1 minute, it expires and calls with that scroll param will fail
  • If the end of the scroll is reached, "companies" will be empty and the scroll parameter will expire

📘 Scroll Parameter

You can get the first page of companies by simply sending a GET request to the scroll endpoint. For subsequent requests you will need to use the scroll parameter from the response.

❗️ Scroll network timeouts

Since scroll is often used on large datasets network errors such as timeouts can be encountered. When this occurs you will need to restart your scroll query as it is not possible to continue from a specific point when using scroll.

When this occurs you will see a HTTP 500 error with the following message: "Request failed due to an internal network error. Please restart the scroll operation."

SecurityHTTP: bearerAuth
Request
query Parameters
scroll_param
string
header Parameters
Intercom-Version
string (intercom_version)
Default: 2.10

Intercom API version.
By default, it's equal to the version set in the app package.

Enum: "1.0" "1.1" "1.2" "1.3" "1.4" "2.0" "2.1" "2.2" "2.3" "2.4" "2.5" "2.6" "2.7" "2.8" "2.9" "2.10" "Unstable"
Example: 2.10
get
/companies/scroll
Request samples
Responses

200

Successful

Response Schema: application/json
type
string

The type of object - list

Value: "list"
Array of objects (Company)
object or null (Cursor based pages)

Cursor-based pagination is a technique used in the Intercom API to navigate through large amounts of data. A "cursor" or pointer is used to keep track of the current position in the result set, allowing the API to return the data in small chunks or "pages" as needed.

total_count
integer or null

The total number of companies

scroll_param
string

The scroll parameter to use in the next request to fetch the next page of results.

401

Unauthorized

Response samples
application/json
{ "type": "list", "data": [ ], "pages": null, "total_count": null, "scroll_param": "5ff562e0-dcba-45bb-a6ca-ec9dcf49bb0f" }