Skip to main content
Answered

API, close conversation and text message about it


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!

 

View original
Did this topic help you find an answer to your question?

2 replies

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

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
  • 1 reply
  • February 6, 2025

thank you, I have already implemented this


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings