API, close conversation and text message about it | Community
Skip to main content
Answered

API, close conversation and text message about it

  • January 27, 2025
  • 2 replies
  • 71 views

We have many conversations in the backlog with a specific tag. We want to implement a simple Python script that uses an API to find and close these conversations. After closing them, the script should send a message to those chats to inform the users about the closure. How can this be implemented?

Best answer by Jacques Reynolds

Hey ​@Andrii 👋 Jacques here from Intercom Support. I hope all is well today!

You can use the Intercom REST API in your Python script to do this. Here’s how:

  • First, you want to use the Search Conversations Endpoint to use retrieve all Conversations with the tag you’re looking for. You can pass in tag_ids as a parameter to retrieve all Conversation with a specific Tag.
  • Next, to close those Conversation you can use the Manage a Conversation Endpoint. You can add an optional parameter in this API call to send a message to the User of that Conversation when you close it.

Hope this is clear!

 

2 replies

Jacques Reynolds
Intercom Team
Forum|alt.badge.img+7

Hey ​@Andrii 👋 Jacques here from Intercom Support. I hope all is well today!

You can use the Intercom REST API in your Python script to do this. Here’s how:

  • First, you want to use the Search Conversations Endpoint to use retrieve all Conversations with the tag you’re looking for. You can pass in tag_ids as a parameter to retrieve all Conversation with a specific Tag.
  • Next, to close those Conversation you can use the Manage a Conversation Endpoint. You can add an optional parameter in this API call to send a message to the User of that Conversation when you close it.

Hope this is clear!

 


  • Author
  • New Participant
  • February 6, 2025

thank you, I have already implemented this