API ReferenceBuilding AppsInstalling IntercomAPI & Webhook ReferenceCanvas Kit Reference
DocsApp StoreForumBlogYour Apps

Update a visitor

Example Request

$ curl https://api.intercom.io/visitors \
-X PUT \
-H 'Authorization:Bearer <Your access token>'  \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' -d '
{
  "user_id": "124",
  "name": "Winston Smith",
  "custom_attributes": {
    "paid_subscriber" : true,
    "monthly_spend": 155.5,
    "team_mates": 9
  }
}'
HTTP/1.1 200 OK

{
  "user_id": "124",
  "name": "Winston Smith",
  "custom_attributes": {
    "paid_subscriber" : true,
    "monthly_spend": 155.5,
    "team_mates": 9
  }
  
  # and the rest of the Visitor model
}'
visitor.name = "Winston Smith"
visitor.custom_attribute[:foo] = 'bar'
intercom.visitors.save(visitor)

Sending a PUT request to /visitors and passing identifiers (user_id or id) in the body will result in an update of an existing Visitor.

Request Body Parameters

ArgumentTypeRequired?Description
idStringOne ofA unique identified for the visitor which is given by Intercom.
user_idStringOne ofA unique identified for the visitor which is given by you.
nameStringNoThe visitor's name.
custom_attributesObjectNoThe custom attributes which are set for the visitor.

Response

This will return a Visitor Model of the visitor you just updated.