# List attached companies for contact

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

Endpoint: GET /contacts/{id}/companies
Version: Preview
Security: bearerAuth

## Path parameters:

  - `id` (string, required)
    The unique identifier for the contact which is given by Intercom

## Query parameters:

  - `page` (integer)
    The page of results to fetch. Values below 1 are treated as 1.

  - `per_page` (integer)
    The number of companies to return per page. The maximum is 60; a value above 60 returns a `400` error with code `parameter_invalid`.

  - `order` (string)
    The order of the companies by when they were last active (`last_request_at`). The value is case-insensitive, and any value other than `asc` is treated as `desc`.

## Header parameters:

  - `Intercom-Version` (string)

## Response 200 fields (application/json):

  - `type` (string)
    The type of object
    Enum: "list"

  - `data` (array)
    An array containing Company Objects

  - `data.type` (string)
    Value is `company`
    Enum: "company"

  - `data.id` (string)
    The Intercom defined id representing the company.
    Example: 531ee472cce572a6ec000006

  - `data.name` (string)
    The name of the company. Returned HTML-escaped, for example `&` as `&amp;`.
    Example: Blue Sun

  - `data.app_id` (string)
    The Intercom defined code of the workspace the company is associated to.
    Example: ecahpwf5

  - `data.plan` (object)

  - `data.plan.type` (string)
    Value is always "plan"
    Example: plan

  - `data.plan.id` (string)
    The id of the plan
    Example: 269315

  - `data.plan.name` (string)
    The name of the plan
    Example: Pro

  - `data.company_id` (string)
    The company id you have defined for the company. Returned HTML-escaped, for example `&` as `&amp;`.
    Example: 6

  - `data.remote_created_at` (integer)
    The time the company was created by you.
    Example: 1663597223

  - `data.created_at` (integer)
    The time the company was added in Intercom.
    Example: 1663597223

  - `data.updated_at` (integer)
    The last time the company was updated.
    Example: 1663597223

  - `data.last_request_at` (integer)
    The time the company last recorded making a request.
    Example: 1663597223

  - `data.size` (integer)
    The number of employees in the company.
    Example: 100

  - `data.website` (string)
    The URL for the company website.
    Example: https://www.intercom.com

  - `data.industry` (string)
    The industry that the company operates in.
    Example: Software

  - `data.monthly_spend` (integer)
    How much revenue the company generates for your business.
    Example: 100

  - `data.session_count` (integer)
    How many sessions the company has recorded.
    Example: 100

  - `data.user_count` (integer)
    The number of users in the company.
    Example: 100

  - `data.tags` (object)
    The list of tags associated with the company

  - `data.tags.type` (string)
    The type of the object
    Enum: "tag.list"

  - `data.tags.tags` (array)

  - `data.tags.tags.type` (string)
    value is "tag"
    Example: tag

  - `data.tags.tags.id` (string)
    The id of the tag
    Example: 123456

  - `data.tags.tags.name` (string)
    The name of the tag
    Example: Test tag

  - `data.segments` (object)
    Always returned empty. Fetch a company's segments with the list attached segments endpoint.

  - `data.segments.type` (string)
    The type of the object
    Enum: "segment.list"

  - `data.segments.segments` (array)

  - `data.segments.segments.type` (string)
    The type of object.
    Enum: "segment"

  - `data.segments.segments.id` (string)
    The unique identifier representing the segment.
    Example: 56203d253cba154d39010062

  - `data.segments.segments.name` (string)
    The name of the segment.
    Example: Active

  - `data.segments.segments.created_at` (integer)
    The time the segment was created.
    Example: 1394621988

  - `data.segments.segments.updated_at` (integer)
    The time the segment was updated.
    Example: 1394622004

  - `data.segments.segments.person_type` (string)
    Type of the contact: contact (lead) or user.
    Enum: "contact", "user"

  - `data.segments.segments.count` (integer)
    The number of items in the user segment. It's returned when the request has `include_count` with a value. A company segment only gets a count when a contact segment has the same name, and it shows that segment's count.
    Example: 3

  - `data.notes` (object)
    The list of notes associated with the company

  - `data.notes.type` (string)
    The type of the object
    Enum: "note.list"

  - `data.notes.data` (array)
    The notes on the company, newest first.

  - `data.notes.data.type` (string)
    String representing the object's type. Always has the value `note`.
    Example: note

  - `data.notes.data.id` (string)
    The id of the note.
    Example: 17495962

  - `data.notes.data.url` (string)
    The relative URL of the note.
    Example: /notes/17495962

  - `data.notes.data.body` (string)
    The body text of the note.
    Example: <p>Text for the note.</p>

  - `data.notes.url` (string)
    The relative URL of the company's notes.
    Example: /companies/531ee472cce572a6ec000006/notes

  - `data.notes.total_count` (integer)
    The number of notes in `data`.
    Example: 1

  - `data.notes.has_more` (boolean)
    Always `false`. Every note on the company is returned in `data`.
    Example: false

  - `total_count` (integer)
    The total number of companies associated to this contact
    Example: 100

  - `pages` (object)
    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.

  - `pages.type` (string)
    Enum: "pages"

  - `pages.page` (integer)
    Example: 1

  - `pages.next` (string)
    A link to the next page of results. Omitted or `null` on the last page, depending on the list. Some lists never include `next` or `prev`, so compare `page` with `total_pages` to tell whether more pages remain.

  - `pages.prev` (string)
    A link to the previous page of results. Omitted on the first page.

  - `pages.per_page` (integer)
    Example: 50

  - `pages.total_pages` (integer)
    Example: 1

## Response 400 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (any, required)
    A string indicating the kind of error, used to further qualify the HTTP response code. A few request validation errors send an HTTP status code as an integer here instead, for example `422`.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (any, required)
    A string indicating the kind of error, used to further qualify the HTTP response code. A few request validation errors send an HTTP status code as an integer here instead, for example `422`.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

## Response 404 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: error.list

  - `request_id` (string)
    Example: f93ecfa8-d08a-4325-8694-89aeb89c8f85

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (any, required)
    A string indicating the kind of error, used to further qualify the HTTP response code. A few request validation errors send an HTTP status code as an integer here instead, for example `422`.
    Example: unauthorized

  - `errors.message` (string)
    Optional. Human readable description of the error.
    Example: Access Token Invalid

