Solved

Listing Conversations since a specific date

  • 11 September 2023
  • 3 replies
  • 105 views

Hi! My company has a use case to list conversations in a specific inbox that have been created since a specific, dynamic, timestamp. Ex: we want to list all new conversations in an inbox that have been created within the last 30 minutes. 

 

So far, we’ve been attempting to use the list conversations endpoint, and newly created search endpoint, without success. Each time, it seems the Front API is returning a much larger timeframe of conversations within the inbox. 

 

Here’s the API request we’re currently using: https://api2.frontapp.com/conversations/search/inbox:XYZ after:1694445506?limit=100

 

Has anyone had success here? Would love to hear if there’s a better way!

icon

Best answer by justin 12 September 2023, 19:29

View original

3 replies

Userlevel 3
Badge +7

Hi, Isaac!

Justin here with the support engineering team 👋

I would recommend the endpoint that you are using to search for that query. With the after query, please keep the following in mind:

Searches for conversations with an initial message created after the minute specified by the Unix timestamp.

The filter only applies to the conversation's first message creation date. It is not affected by subsequent messages in the conversation, or by the conversation's creation date, which can differ from the initial message date if the conversation was imported into Front after the first message was created in an external system.

 

If you believe that the payload includes results that lie outside of this logic, please reach out to us privately with the full payload in question. We’d be happy to take a closer look at your particular example. 

Thanks, 
Justin 

Thanks Justin, I appreciate the feedback. Unfortunately the payload I am receiving does not align with what I am expecting. I’ll send you a DM with some info!

Was this resolved? I’m having the same problem. The ‘after’ parameter is not honored in my responses. Also, my messages are ordered newest to oldest; is that a problem? Here are my logs outputting convos and nested message dates:

query inbox:inb_XXXX after:1702339200
Hitting url https://api2.frontapp.com/conversations/search/inbox%3Ainb_XXXX%20after%3A1702339200

cnv_lvjg05j date: 2023-12-07 16:54 Unix: 1701968047.731
Hitting url https://api2.frontapp.com/conversations/cnv_lvjg05j/messages
    msg_1ic6k1hj created at 2023-12-11 19:24 Unix: 1702322646.234
    msg_1i8gwirr created at 2023-12-07 16:54 Unix: 1701968046

cnv_lwtxx8n date: 2023-12-12 15:45 Unix: 1702395930.021
Hitting url https://api2.frontapp.com/conversations/cnv_lwtxx8n/messages
    msg_1id76r7r created at 2023-12-12 15:45 Unix: 1702395939.214
    msg_1id76op3 created at 2023-12-12 15:45 Unix: 1702395938.816
    msg_1id76bnr created at 2023-12-12 15:45 Unix: 1702395925

 

Thanks!

Reply