DocsBuilding AppsInstalling IntercomAPI & Webhook ReferenceCanvas Kit Reference
DocsApp StoreForumBlogYour Apps

Attach a contact

Example Request & Response

$ curl https://api.intercom.io/contacts/<id>/companies \
-X POST \
-H 'Authorization:Bearer <Your access token>' \
-H 'Accept:application/json' -d

{
    "id": "56cde0cc3deab1bd8c000100"
}
HTTP/1.1 200 OK
{
  "type": "company",
  "company_id": "12234934893",
  "id": "5db0c9b03d7cf9a50452754e",
  "app_id": "tx2p130c",
  "created_at": 1571867056,
  "updated_at": 1571867056,
  "monthly_spend": 0,
  "session_count": 0,
  "user_count": 0,
  "tags": {
    "type": "tag.list",
    "tags": []
  },
  "segments": {
    "type": "segment.list",
    "segments": []
  },
  "plan": {},
  "custom_attributes": {
    "new_cda_439084398494": true,
    "creation_source": "api"
  }
}
Example Errors

HTTP/1.1 404 NOT FOUND
{
  "type": "error.list",
  "request_id": "9a3d0816-9707-4598-977e-c009ba630148",
  "errors": [
    {
      "code": "not_found",
      "message": "Contact Not Found"
    }
  ]
}
HTTP/1.1 404 NOT FOUND
{
  "type": "error.list",
  "request_id": "5f6b2623-f844-4914-8b8d-ac01acc62a76",
  "errors": [
    {
      "code": "company_not_found",
      "message": "Company Not Found"
    }
  ]
}

You can attach a company to a single contact.

Request Path Parameter

Parameter

Type

Required

Description

id

String

Yes

The unique identifier for the contact which is given by Intercom

Request Body Parameter

Parameter

Type

Required

Description

id

String

Yes

The unique identifier for the company which is given by Intercom

Response

This will return a Company model for the company that was just attached to the contact.