Convert a visitor

You can merge a Visitor to a Contact of role type lead or user.

What happens upon a visitor being converted?

If the User exists, then the Visitor will be merged into it, the Visitor deleted and the User returned. If the User does not exist, the Visitor will be converted to a User, with the User identifiers replacing it's Visitor identifiers.

Request Body Parameters

ArgumentTypeRequired?Description
visitorObjectYesThe unique identifiers to convert a single Visitor.
userObjectYesThe unique identifiers retained after converting or merging.
typeStringYesRepresents the role of the Contact model. Accepts lead or user.

Visitor object

ArgumentTypeRequired?Description
idStringOne ofThe unique identifier for the contact which is given by Intercom.
user_idStringOne ofA unique identifier for the contact which is given to Intercom.
emailStringOne ofThe visitor's email.

User object (a contact)

ArgumentTypeRequired?Description
idStringOne ofThe unique identifier for the contact which is given by Intercom.
user_idStringOne ofA unique identifier for the contact which is given to Intercom, which will be represented as external_id.
emailStringNoThe contact's email, retained by default if one is present.

Example Request & Response

$ curl \\https://api.intercom.io/visitors/convert \\-X POST \\-H 'Authorization:Bearer <Your access token>' \\-H 'Accept:application/json' \\-H 'Content-Type: application/json' -d '{  \"visitor\": {    \"user_id\": \"8a88a590-e1c3-41e2-a502-e0649dbf721c\"  },  \"user\": {    \"email\": \"winstonsmith@truth.org\"  },  \"type\": \"user\"}'
# NB: Full User objects are returned{  \"type\": \"lead\",  \"user_id\": \"8a88a590-e1c3-41e2-a502-e0649dbf721c\"}

Response

This will return a Contact model of the visitor you just converted or merged into.