> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Intercom: List Companies For Acontact

> List the companies an Intercom contact is attached to. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

List the companies an Intercom contact is attached to.

> [!NOTE]
>
> Tool ID: `intercom_list_companies_for_acontact`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'intercom_list_companies_for_acontact',
  {
    "contact_id": "contact_123"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute intercom_list_companies_for_acontact --input '{
  "contact_id": "contact_123"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "type": "list",
    "companies": [
      {
        "type": "company",
        "id": "id_123",
        "name": "Example"
      }
    ],
    "total_count": 123
  }
}
```

Use `deepline describe intercom_list_companies_for_acontact --json` for the latest machine-readable contract.

## Input reference

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

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.contact_id` | `string` | Yes | — | The unique identifier for the contact which is given by Intercom |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "You can fetch a list of companies that are associated to a contact.",
    "properties": {
      "contact_id": {
        "type": "string",
        "description": "The unique identifier for the contact which is given by Intercom"
      }
    },
    "required": [
      "contact_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | A list of Company Objects |
| `result.data.type` | `"list"` | No | — | The type of object Allowed: `list`. |
| `result.data.companies` | `array` | No | — | An array containing Company Objects |
| `result.data.companies[].type` | `"company"` | No | — | Value is `company` Allowed: `company`. |
| `result.data.companies[].id` | `string` | No | — | The Intercom defined id representing the company. |
| `result.data.companies[].name` | `string` | No | — | The name of the company. |
| `result.data.companies[].app_id` | `string` | No | — | The Intercom defined code of the workspace the company is associated to. |
| `result.data.companies[].plan` | `object` | No | — | — |
| `result.data.companies[].plan.type` | `string` | No | — | Value is always "plan" |
| `result.data.companies[].plan.id` | `string` | No | — | The id of the plan |
| `result.data.companies[].plan.name` | `string` | No | — | The name of the plan |
| `result.data.companies[].company_id` | `string` | No | — | The company id you have defined for the company. |
| `result.data.companies[].remote_created_at` | `integer` | No | — | The time the company was created by you. |
| `result.data.companies[].created_at` | `integer` | No | — | The time the company was added in Intercom. |
| `result.data.companies[].updated_at` | `integer` | No | — | The last time the company was updated. |
| `result.data.companies[].last_request_at` | `integer` | No | — | The time the company last recorded making a request. |
| `result.data.companies[].size` | `integer` | No | — | The number of employees in the company. |
| `result.data.companies[].website` | `string` | No | — | The URL for the company website. |
| `result.data.companies[].industry` | `string` | No | — | The industry that the company operates in. |
| `result.data.companies[].monthly_spend` | `integer` | No | — | How much revenue the company generates for your business. |
| `result.data.companies[].session_count` | `integer` | No | — | How many sessions the company has recorded. |
| `result.data.companies[].user_count` | `integer` | No | — | The number of users in the company. |
| `result.data.companies[].custom_attributes` | `record` | No | — | The custom attributes you have set on the company. |
| `result.data.companies[].tags` | `object` | No | — | The list of tags associated with the company |
| `result.data.companies[].tags.type` | `"tag.list"` | No | — | The type of the object Allowed: `tag.list`. |
| `result.data.companies[].tags.tags` | `array` | No | — | — |
| `result.data.companies[].tags.tags[].type` | `string` | No | — | value is "tag" |
| `result.data.companies[].tags.tags[].id` | `string` | No | — | The id of the tag |
| `result.data.companies[].tags.tags[].name` | `string` | No | — | The name of the tag |
| `result.data.companies[].segments` | `object` | No | — | The list of segments associated with the company |
| `result.data.companies[].segments.type` | `"segment.list"` | No | — | The type of the object Allowed: `segment.list`. |
| `result.data.companies[].segments.segments` | `array` | No | — | — |
| `result.data.companies[].segments.segments[].type` | `"segment"` | No | — | The type of object. Allowed: `segment`. |
| `result.data.companies[].segments.segments[].id` | `string` | No | — | The unique identifier representing the segment. |
| `result.data.companies[].segments.segments[].name` | `string` | No | — | The name of the segment. |
| `result.data.companies[].segments.segments[].created_at` | `integer` | No | — | The time the segment was created. |
| `result.data.companies[].segments.segments[].updated_at` | `integer` | No | — | The time the segment was updated. |
| `result.data.companies[].segments.segments[].person_type` | `"contact" \| "user"` | No | — | Type of the contact: contact (lead) or user. Allowed: `contact`, `user`. |
| `result.data.companies[].segments.segments[].count` | `integer \| null` | No | — | The number of items in the user segment. It's returned when `include_count=true` is included in the request. |
| `result.data.total_count` | `integer` | No | — | The total number of companies associated to this contact |
| `result.data.pages` | `object` | No | — | 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. |
| `result.data.pages.type` | `"pages"` | No | — | Allowed: `pages`. |
| `result.data.pages.page` | `integer` | No | — | — |
| `result.data.pages.next` | `string \| null` | No | — | A link to the next page of results. A response that does not contain a next link does not have further data to fetch. Format: `uri`. |
| `result.data.pages.per_page` | `integer` | No | — | — |
| `result.data.pages.total_pages` | `integer` | No | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "A list of Company Objects",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of object",
            "enum": [
              "list"
            ]
          },
          "companies": {
            "type": "array",
            "description": "An array containing Company Objects",
            "items": {
              "type": "object",
              "description": "Companies allow you to represent organizations using your product. Each company will have its own description and be associated with contacts. You can fetch, create, update and list companies.",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Value is `company`",
                  "enum": [
                    "company"
                  ]
                },
                "id": {
                  "type": "string",
                  "description": "The Intercom defined id representing the company."
                },
                "name": {
                  "type": "string",
                  "description": "The name of the company."
                },
                "app_id": {
                  "type": "string",
                  "description": "The Intercom defined code of the workspace the company is associated to."
                },
                "plan": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Value is always \"plan\""
                    },
                    "id": {
                      "type": "string",
                      "description": "The id of the plan"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the plan"
                    }
                  },
                  "additionalProperties": false
                },
                "company_id": {
                  "type": "string",
                  "description": "The company id you have defined for the company."
                },
                "remote_created_at": {
                  "type": "integer",
                  "description": "The time the company was created by you."
                },
                "created_at": {
                  "type": "integer",
                  "description": "The time the company was added in Intercom."
                },
                "updated_at": {
                  "type": "integer",
                  "description": "The last time the company was updated."
                },
                "last_request_at": {
                  "type": "integer",
                  "description": "The time the company last recorded making a request."
                },
                "size": {
                  "type": "integer",
                  "description": "The number of employees in the company."
                },
                "website": {
                  "type": "string",
                  "description": "The URL for the company website."
                },
                "industry": {
                  "type": "string",
                  "description": "The industry that the company operates in."
                },
                "monthly_spend": {
                  "type": "integer",
                  "description": "How much revenue the company generates for your business."
                },
                "session_count": {
                  "type": "integer",
                  "description": "How many sessions the company has recorded."
                },
                "user_count": {
                  "type": "integer",
                  "description": "The number of users in the company."
                },
                "custom_attributes": {
                  "type": "object",
                  "description": "The custom attributes you have set on the company.",
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "tags": {
                  "type": "object",
                  "description": "The list of tags associated with the company",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The type of the object",
                      "enum": [
                        "tag.list"
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "A tag allows you to label your contacts, companies, and conversations and list them using that tag.",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "value is \"tag\""
                          },
                          "id": {
                            "type": "string",
                            "description": "The id of the tag"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the tag"
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                },
                "segments": {
                  "type": "object",
                  "description": "The list of segments associated with the company",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The type of the object",
                      "enum": [
                        "segment.list"
                      ]
                    },
                    "segments": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "description": "A segment is a group of your contacts defined by the rules that you set.",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "The type of object.",
                            "enum": [
                              "segment"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "description": "The unique identifier representing the segment."
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the segment."
                          },
                          "created_at": {
                            "type": "integer",
                            "description": "The time the segment was created."
                          },
                          "updated_at": {
                            "type": "integer",
                            "description": "The time the segment was updated."
                          },
                          "person_type": {
                            "type": "string",
                            "description": "Type of the contact: contact (lead) or user.",
                            "enum": [
                              "contact",
                              "user"
                            ]
                          },
                          "count": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "The number of items in the user segment. It's returned when `include_count=true` is included in the request."
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          },
          "total_count": {
            "type": "integer",
            "description": "The total number of companies associated to this contact"
          },
          "pages": {
            "type": "object",
            "description": "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.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "pages"
                ]
              },
              "page": {
                "type": "integer"
              },
              "next": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A link to the next page of results. A response that does not contain a next link does not have further data to fetch.",
                "format": "uri"
              },
              "per_page": {
                "type": "integer"
              },
              "total_pages": {
                "type": "integer"
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Intercom provider guide](https://deepline.com/docs/providers/intercom/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.