Answered

Can I list company segments through the API?


What's the best way to get a list of company segments from the api? There's only contact segments in the api docs.

icon

Best answer by Sam 10 June 2021, 19:13

View original

3 replies

Badge +1

I've just had a quick look and test of the API and I wasn't able to find a way to retrieve all the company segments. This could be useful in some cases, so definitely worth adding it to @Product Wishlist​ 

 

I'm interested a bit more in your specific use case for this. Are you trying to retrieve the company segments for a particular reason? 😊

Yup, we're looking to capture the counts of companies in each segment so we can see how certain ones change over time; currently we've been copying pasting from the intercom interface into google sheets hehe. I ended up finding the "Counts" section in the api docs, which i hadn't noticed before. Using this, we can get a list of all company segment names with counts for each, and that pretty much does everything we need it to.

https://developers.intercom.com/intercom-api-reference/reference#company-tag-counts/p>

@kevin d14​ are you having an issue where the COUNTS don't update when you call the api? The counts aren't updating for me until I actually open the full URL of a segment in a browser. The API is returning a non-updated value.

 

I suspect you had this issue if it's an intercom side issue, and that it's my code if you didn't have this issue.

 

Reply