API call to pull all conversations related to a company

I’m trying to figure out the best way to find all conversations related to a single company. Ideally with a single call…

I know we can look up the company to find all the contacts, and then individually look up each contacts conversations, but we have some companies with 30+ users so would need to do 30 different calls and then process all the conversations just to list the most recent conversations across that company.

Any suggestions/workarounds?

Pretty sure that’s not possible via Intercom’s conversations search API. They claim you can only query using the conversation model fields, which don’t seem to include any reference to a company object.

If you’re not in need of doing this “real time” and you have a Segment account and data warehouse, they sync over all conversation and conversation parts every 24 hours, which you could then write a query against to get it all via something like the redshift APIs (or whoever your warehouse provider is).