Skip to content

List attached companies for contact

Request

You can fetch a list of companies that are associated to a contact.

Security
bearerAuth
Path
contact_idstringrequired

The unique identifier for the contact which is given by Intercom

Example:63a07ddf05a32042dffac965
Headers
Intercom-Versionstring(intercom_version)

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

Default:"2.16"
Enum:"1.0""1.1""1.2""1.3""1.4""2.0""2.1""2.2""2.3""2.4"
Example:2.16
/**
 * Requires libcurl
 */

const contactId = "63a07ddf05a32042dffac965";
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <YOUR_TOKEN_HERE>",
    "Intercom-Version: 2.16"
  ],
  CURLOPT_URL => "https://api.intercom.io/contacts/" . contactId . "/companies",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$error = curl_error($curl);

curl_close($curl);

if ($error) {
  echo "cURL Error #:" . $error;
} else {
  echo $response;
}

Responses

successful

Bodyapplication/json
typestring

The type of object

Value:"list"
Example:"list"
companiesArray of objects(Company)

An array containing Company Objects

total_countinteger

The total number of companies associated to this contact

Example:100

The majority of list resources in the API are paginated to allow clients to traverse data over multiple requests.

Their responses are likely to contain a pages object that hosts pagination links which a client can use to paginate through the data without having to construct a query. The link relations for the pages field are as follows.

Response
{ "type": "list", "data": [ {} ], "pages": { "type": "pages", "next": null, "page": 1, "per_page": 50, "total_pages": 1 }, "total_count": 1 }