# List attached contacts

`GET /companies/{company_id}/contacts`

> This is a subset of the full specification, limited to the `GET /companies/{company_id}/contacts` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.15/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `GET /companies/{company_id}/contacts` operation. Components more than 3 `$ref` hops away are not included.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: Companies
    description: Everything about your Companies
  - name: Contacts
    description: Everything about your contacts
paths:
  /companies/{company_id}/contacts:
    get:
      summary: List attached contacts
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
        - name: company_id
          in: path
          required: true
          description: The unique identifier for the company which is given by Intercom
          example: 5f4d3c1c-7b1b-4d7d-a97e-6095715c6632
          schema:
            type: string
      tags:
        - Companies
        - Contacts
      operationId: ListAttachedContacts
      description: You can fetch a list of all contacts that belong to a company.
      responses:
        '200':
          description: Successful
          content:
            application/json:
              examples:
                Successful:
                  value:
                    type: list
                    data: []
                    total_count: 0
                    pages:
                      type: pages
                      page: 1
                      per_page: 50
                      total_pages: 0
              schema:
                $ref: '#/components/schemas/company_attached_contacts'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: f7586690-c217-47db-9042-cb9550b81260
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Company Not Found
          content:
            application/json:
              examples:
                Company Not Found:
                  value:
                    type: error.list
                    request_id: 5dde0b79-8c81-4d9e-a4d4-736a44cf2f00
                    errors:
                      - code: company_not_found
                        message: Company Not Found
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    company_attached_contacts:
      title: Company Attached Contacts
      type: object
      description: A list of Contact Objects
      properties:
        type:
          type: string
          description: The type of object - `list`
          enum:
            - list
          example: list
        data:
          type: array
          description: An array containing Contact Objects
          items:
            $ref: '#/components/schemas/contact'
        total_count:
          type: integer
          description: The total number of contacts
          example: 100
        pages:
          $ref: '#/components/schemas/cursor_pages'
    contact:
      title: Contact
      type: object
      x-tags:
        - Contacts
      x-fern-sdk-group-name: contacts
      description: Contacts represent your leads and users in Intercom.
      properties:
        type:
          type: string
          description: The type of object.
          example: contact
        id:
          type: string
          description: The unique identifier for the contact which is given by Intercom.
          example: 5ba682d23d7cf92bef87bfd4
        external_id:
          type: string
          nullable: true
          description: The unique identifier for the contact which is provided by the Client.
          example: f3b87a2e09d514c6c2e79b9a
        workspace_id:
          type: string
          description: The id of the workspace which the contact belongs to.
          example: ecahpwf5
        role:
          type: string
          description: The role of the contact.
          example: user
        email:
          type: string
          description: The contact's email.
          example: joe@example.com
        email_domain:
          type: string
          description: The contact's email domain.
          example: example.com
        phone:
          type: string
          nullable: true
          description: The contacts phone.
          example: '+1123456789'
        name:
          type: string
          nullable: true
          description: The contacts name.
          example: John Doe
        owner_id:
          type: integer
          nullable: true
          description: The id of an admin that has been assigned account ownership of the contact.
          example: 123
        has_hard_bounced:
          type: boolean
          description: Whether the contact has had an email sent to them hard bounce.
          example: true
        marked_email_as_spam:
          type: boolean
          description: Whether the contact has marked an email sent to them as spam.
          example: true
        unsubscribed_from_emails:
          type: boolean
          description: Whether the contact is unsubscribed from emails.
          example: true
        created_at:
          type: integer
          format: date-time
          description: (Unix timestamp in seconds) The time when the contact was created.
          example: 1571672154
        updated_at:
          type: integer
          format: date-time
          description: (Unix timestamp in seconds) The time when the contact was last updated.
          example: 1571672154
        signed_up_at:
          type: integer
          format: date-time
          nullable: true
          description: (Unix timestamp in seconds) The time specified for when a contact signed up.
          example: 1571672154
        last_seen_at:
          type: integer
          format: date-time
          nullable: true
          description: (Unix timestamp in seconds) The time when the contact was last seen (either where the Intercom Messenger was installed or when specified manually).
          example: 1571672154
        last_replied_at:
          type: integer
          format: date-time
          nullable: true
          description: (Unix timestamp in seconds) The time when the contact last messaged in.
          example: 1571672154
        last_contacted_at:
          type: integer
          format: date-time
          nullable: true
          description: (Unix timestamp in seconds) The time when the contact was last messaged.
          example: 1571672154
        last_email_opened_at:
          type: integer
          format: date-time
          nullable: true
          description: (Unix timestamp in seconds) The time when the contact last opened an email.
          example: 1571672154
        last_email_clicked_at:
          type: integer
          format: date-time
          nullable: true
          description: (Unix timestamp in seconds) The time when the contact last clicked a link in an email.
          example: 1571672154
        language_override:
          type: string
          nullable: true
          description: A preferred language setting for the contact, used by the Intercom Messenger even if their browser settings change.
          example: en
        browser:
          type: string
          nullable: true
          description: The name of the browser which the contact is using.
          example: Chrome
        browser_version:
          type: string
          nullable: true
          description: The version of the browser which the contact is using.
          example: 80.0.3987.132
        browser_language:
          type: string
          nullable: true
          description: The language set by the browser which the contact is using.
          example: en-US
        os:
          type: string
          nullable: true
          description: The operating system which the contact is using.
          example: Mac OS X
        android_app_name:
          type: string
          nullable: true
          description: The name of the Android app which the contact is using.
          example: Intercom
        android_app_version:
          type: string
          nullable: true
          description: The version of the Android app which the contact is using.
          example: 5.0.0
        android_device:
          type: string
          nullable: true
          description: The Android device which the contact is using.
          example: Pixel 3
        android_os_version:
          type: string
          nullable: true
          description: The version of the Android OS which the contact is using.
          example: '10'
        android_sdk_version:
          type: string
          nullable: true
          description: The version of the Android SDK which the contact is using.
          example: '28'
        android_last_seen_at:
          type: integer
          nullable: true
          format: date-time
          description: (Unix timestamp in seconds) The time when the contact was last seen on an Android device.
          example: 1571672154
        ios_app_name:
          type: string
          nullable: true
          description: The name of the iOS app which the contact is using.
          example: Intercom
        ios_app_version:
          type: string
          nullable: true
          description: The version of the iOS app which the contact is using.
          example: 5.0.0
        ios_device:
          type: string
          nullable: true
          description: The iOS device which the contact is using.
          example: iPhone 11
        ios_os_version:
          type: string
          nullable: true
          description: The version of iOS which the contact is using.
          example: 13.3.1
        ios_sdk_version:
          type: string
          nullable: true
          description: The version of the iOS SDK which the contact is using.
          example: 13.3.1
        ios_last_seen_at:
          type: integer
          nullable: true
          format: date-time
          description: (Unix timestamp in seconds) The last time the contact used the iOS app.
          example: 1571672154
        custom_attributes:
          type: object
          description: The custom attributes which are set for the contact.
        avatar:
          type: object
          nullable: true
          properties:
            type:
              type: string
              description: The type of object
              example: avatar
            image_url:
              type: string
              format: uri
              nullable: true
              description: An image URL containing the avatar of a contact.
              example: https://example.org/128Wash.jpg
        tags:
          $ref: '#/components/schemas/contact_tags'
        notes:
          $ref: '#/components/schemas/contact_notes'
        companies:
          $ref: '#/components/schemas/contact_companies'
        location:
          $ref: '#/components/schemas/contact_location'
        social_profiles:
          $ref: '#/components/schemas/contact_social_profiles'
    contact_companies:
      title: Contact companies
      type: object
      nullable: false
      description: An object with metadata about companies attached to a contact . Up to 10 will be displayed here. Use the url to get more.
      properties:
        data:
          type: array
          description: An array of company data objects attached to the contact.
          items:
            $ref: '#/components/schemas/company_data'
        url:
          type: string
          format: uri
          description: Url to get more company resources for this contact
          example: /contacts/5ba682d23d7cf92bef87bfd4/companies
        total_count:
          type: integer
          description: Integer representing the total number of companies attached to this contact
          example: 100
        has_more:
          type: boolean
          description: Whether there's more Addressable Objects to be viewed. If true, use the url to view all
          example: true
    contact_location:
      title: Contact Location
      type: object
      nullable: false
      description: An object containing location meta data about a Intercom contact.
      properties:
        type:
          type: string
          nullable: true
          description: Always location
          example: location
        country:
          type: string
          nullable: true
          description: The country that the contact is located in
          example: Ireland
        region:
          type: string
          nullable: true
          description: The overal region that the contact is located in
          example: Dublin
        city:
          type: string
          nullable: true
          description: The city that the contact is located in
          example: Dublin
    contact_notes:
      title: Contact notes
      type: object
      nullable: false
      description: An object containing notes meta data about the notes that a contact has. Up to 10 will be displayed here. Use the url to get more.
      properties:
        data:
          type: array
          description: This object represents the notes attached to a contact.
          items:
            $ref: '#/components/schemas/addressable_list'
        url:
          type: string
          format: uri
          description: Url to get more company resources for this contact
          example: /contacts/5ba682d23d7cf92bef87bfd4/notes
        total_count:
          type: integer
          description: Int representing the total number of companyies attached to this contact
          example: 100
        has_more:
          type: boolean
          description: Whether there's more Addressable Objects to be viewed. If true, use the url to view all
          example: true
    contact_social_profiles:
      title: Social Profile
      type: object
      nullable: false
      description: An object containing social profiles that a contact has.
      properties:
        data:
          type: array
          description: A list of social profiles objects associated with the contact.
          items:
            $ref: '#/components/schemas/social_profile'
    contact_tags:
      title: Contact Tags
      type: object
      nullable: true
      description: An object containing tags meta data about the tags that a contact has. Up to 10 will be displayed here. Use the url to get more.
      properties:
        data:
          type: array
          description: This object represents the tags attached to a contact.
          items:
            $ref: '#/components/schemas/addressable_list'
        url:
          type: string
          format: uri
          description: url to get more tag resources for this contact
          example: /contacts/5ba682d23d7cf92bef87bfd4/tags
        total_count:
          type: integer
          description: Int representing the total number of tags attached to this contact
          example: 100
        has_more:
          type: boolean
          description: Whether there's more Addressable Objects to be viewed. If true, use the url to view all
          example: true
    cursor_pages:
      title: Cursor based pages
      type: object
      description: |
        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.
      nullable: true
      properties:
        type:
          type: string
          description: the type of object `pages`.
          example: pages
          enum:
            - pages
        page:
          type: integer
          description: The current page
          example: 1
        next:
          $ref: '#/components/schemas/starting_after_paging'
        per_page:
          type: integer
          description: Number of results per page
          example: 2
        total_pages:
          type: integer
          description: Total number of pages
          example: 13
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              field:
                type: string
                nullable: true
                description: Optional. Used to identify a particular field or query parameter that was in error.
                example: email
            required:
              - code
      required:
        - type
        - errors
    intercom_version:
      description: Intercom API version.</br>By default, it's equal to the version set in the app package.
      type: string
      example: '2.15'
      default: '2.15'
      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'
        - '2.11'
        - '2.12'
        - '2.13'
        - '2.14'
        - '2.15'
    starting_after_paging:
      title: 'Pagination: Starting After'
      type: object
      nullable: true
      properties:
        per_page:
          type: integer
          description: The number of results to fetch per page.
          example: 2
        starting_after:
          type: string
          description: The cursor to use in the next request to get the next page of results.
          nullable: true
          example: your-cursor-from-response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
