# Exporting all Messages for all threads

**URL:** <https://community.hubspot.com/t/exporting-all-messages-for-all-threads/98431>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [January 23, 2024, 1:58pm UTC](https://community.hubspot.com/t/exporting-all-messages-for-all-threads/98431 "2024-01-23T13:58:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexoberneyer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alexoberneyer/32/71484_2.png) [@alexoberneyer](https://community.hubspot.com/u/alexoberneyer)\
**Post date:** [January 23, 2024, 1:58pm UTC](https://community.hubspot.com/t/exporting-all-messages-for-all-threads/98431/1 "2024-01-23T13:58:57Z")

</div>

I would like to extract all messages for all threads for all inboxes. The goal is to do some analysis on the messages and downstream processing.

Currently I am thinking about the following procedure:

1. Get all threads via threads api: [https://api.hubapi.com/conversations/v3/conversations/threads](https://api.hubapi.com/conversations/v3/conversations/threads)

2. Get all messages for each thread via messages api: [https://api.hubapi.com/conversations/v3/conversations/threads{threadId}/messages](https://api.hubapi.com/conversations/v3/conversations/threads%7BthreadId%7D/messages)

3. Store the result in a database, so that I can use it for downstream processing.

Is there a better way to do it? Specifically is there a way to get all messages for all threads for a given inbox in one request?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [January 24, 2024, 4:41pm UTC](https://community.hubspot.com/t/exporting-all-messages-for-all-threads/98431/2 "2024-01-24T16:41:30Z")

</div>

Hey, @alexoberneyer. Thanks for your questions. To your last question, there is not a unified endpoint or way to do this in a single call. We’ll leave this open in case other community members would like to share how they structure their requests.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![Cerwind](https://avatars.discourse-cdn.com/v4/letter/c/6f9a4e/32.png) [@Cerwind](https://community.hubspot.com/u/Cerwind)\
**Post date:** [July 6, 2024, 12:34pm UTC](https://community.hubspot.com/t/exporting-all-messages-for-all-threads/98431/3 "2024-07-06T12:34:43Z")

</div>

We have a similar use case. Right now we’re doing something very similar to your procedure but it would be great [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) to have something like on this on the API. Like a `/conversations/threads/all` with a `count` so we know how many there are.
