Skip to main content
Answer

How to query conversation by type on the api

  • February 1, 2023
  • 2 replies
  • 122 views

Forum|alt.badge.img

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

Best answer by jason

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!

2 replies

jason
Forum|alt.badge.img+8
  • Fronteer
  • Answer
  • February 2, 2023

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!


Forum|alt.badge.img
  • Author
  • Conversationalist
  • February 2, 2023

That worked perfect @jason Thanks for helping out 😄