Example Request
$ curl https://api.intercom.io/visitors \
-XPUT \
-H 'Authorization:Bearer <Your access token>' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' -d '
{
"user_id": "124",
"name": "Winston Smith",
"last_seen_ip" : "1.2.3.4",
"last_seen_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9",
"custom_attributes": {
"paid_subscriber" : true,
"monthly_spend": 155.5,
"team_mates": 9
}
}'
HTTP/1.1 200 OK
# contact response
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.
It is not possible to uniquely identify a Visitor for an update with an email address. Including an email address in the PUT request will result in converting the Visitor to a Lead.