Closing a conversation

You can close a conversation with or without a reply once you set the message to close: "message_type":"close".

Closing a Conversation Without Reply

curl https://api.intercom.io/conversations/xxx/reply -X POST -H 'Authorization:Bearer <Your access token>' -H 'Accept:application/json' -H 'Content-Type:application/json' -d '{ "admin_id": CLOSING_ADMIN_ID, "message_type": "close", "type": "admin"}'
<?php $intercom->conversations->replyToConversation("10957850396", [ "type" => "admin", "admin_id" => "814860", "message_type" => "close" ]); ?>
Closing a Conversation With Reply

curl https://api.intercom.io/conversations/xxx/reply -X POST -H 'Authorization:Bearer <Your access token>' -H 'Accept:application/json' -H 'Content-Type:application/json' -d '{ "body":"closing this convo", "admin_id": CLOSING_ADMIN_ID, "message_type": "close", "type": "admin"}'
<?php $convo = $intercom->conversations->replyToConversation("10957850396", [ "body" => "The beginning is the most important part of the work, but this is the end ... of the conversation!", "type" => "admin", "admin_id" => "814860", "message_type" => "close" ]); ?>