Solved

How to query conversation by type on the api

  • 1 February 2023
  • 2 replies
  • 78 views

Badge

Is there a way to fetch/list only intercom conversations using the conversation api ?

icon

Best answer by jason 2 February 2023, 01:07

View original

2 replies

Userlevel 4
Badge +7

You should be able to accomplish this using the Search Conversations endpoint

Your query would need to search by “recipient”, using the channel address (not channel ID)  (see the conversation search syntax). 

As an example, we can call GET /channels to list all our channels via the API. From there, find your Intercom channel, and look at the address field. For the sake of this example, let’s imagine the address value is abc123

Our API call to search for conversations sent/received via that channel would then be the following;

GET https://api2.frontapp.com/conversations/search/recipient:abc123

 

I hope that’s helpful!

Badge

That worked perfect @jason Thanks for helping out 😄

Reply