Attach a contact to a conversation

Example Request & Response

$ curl 'https://api.intercom.io/conversations/<id>/customers' \\\n-X POST \\\n-H 'Authorization:Bearer <Your access token>' \\\n-H 'Accept:application/json' \\\n-H 'Content-Type:application/json' -d\n\n{\n  \"admin_id\": \"781236\",\n  \"customer\": {\n    \"intercom_user_id\": \"58c1c78946a0aa9ef45b098a\"\n  }\n}
HTTP/1.1 200 OK\n\n{\"customers\":[\n  {\"type\":\"user\",\"id\":\"597f02cb22f4bb37597e0b7d\"}, \n  {\"type\":\"lead\",\"id\":\"58ff3f670f14ab4f1aa83750\"}]\n}

You can add participants who are contacts to a conversation, on behalf of either another contact or an admin.

Request Path Parameter

ParameterTypeRequired?Description
idStringYesThe identifier for the conversation as given by Intercom.

Request Body Parameter

Admin's adding a participant

ParameterTypeRequired?Description
admin_idStringYesThe id of the admin who is adding the new participant.
customerObjectYesSee Customer Object below for more.

Contact's adding a participant

ParameterTypeRequired?Description
intercom_user_idStringYes, if no user_id or emailThe identifier for the contact as given by Intercom.
user_idStringYes, if no intercom_user_id or emailThe external_id you have defined for the contact who is adding the new participant.
emailStringYes, if no intercom_user_id or user_idThe email you have defined for the contact who is adding the new participant.
customerObjectYesSee Contact Object below for more.

Customer Object

AttributeTypeRequired?Description
intercom_user_idStringYes, if no user_id or emailThe identifier for the contact as given by Intercom.
user_idStringYes, if no intercom_user_id or emailThe external_id you have defined for the contact who is being added as a participant.
emailStringYes, if the contact's role is lead.
Yes, if no intercom_user_id or user_id.
The email you have defined for the contact who is being added as a participant.

🚧 Note about contacts without an email

If you add a contact via the email parameter and there is no user/lead found on that workspace with he given email, then we will create a new contact with role set to lead.

Response

This will return a customers array containing objects listing the participants in the conversation:

AttributeTypeDescription
typeStringThe role associated to the contact - user or lead.
idStringThe identifier for the contact as given by Intercom.