# email\_campaign table

**URL:** <https://community.hubspot.com/t/email-campaign-table/13449>\
**Category:** APIs & Integrations\
**Tags:** email\
**Created:** [March 11, 2019, 7:19pm UTC](https://community.hubspot.com/t/email-campaign-table/13449 "2019-03-11T19:19:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danr](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danr/32/13631_2.png) [@danr](https://community.hubspot.com/u/danr)\
**Post date:** [March 11, 2019, 7:19pm UTC](https://community.hubspot.com/t/email-campaign-table/13449/1 "2019-03-11T19:19:31Z")

</div>

I am looking to use the API in order to pull in the “email\_campaign” table. This table’s ID contains the email identifier for email events’ email\_campaign\_id. Is there a way to use the API to populate a local copy of that?

---

<div class="post-metadata">

**Author:** ![cbarley](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cbarley/32/82559_2.png) [@cbarley](https://community.hubspot.com/u/cbarley)\
**Post date:** [March 12, 2019, 6:52pm UTC](https://community.hubspot.com/t/email-campaign-table/13449/2 "2019-03-12T18:52:43Z")

</div>

Hi @danr, which part of the app are you in? I can’t quite visualize what you mean by the email\_campaign table. From your description, it sounds like you’d want to use this API: [https://developers.hubspot.com/docs/methods/email/email\_events\_overview](https://developers.hubspot.com/docs/methods/email/email_events_overview), but I’m not totally clear on what you’re asking

---

<div class="post-metadata">

**Author:** ![danr](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danr/32/13631_2.png) [@danr](https://community.hubspot.com/u/danr)\
**Post date:** [March 13, 2019, 1:03am UTC](https://community.hubspot.com/t/email-campaign-table/13449/3 "2019-03-13T01:03:12Z")

</div>

Thanks Connor

We were replicating the Hubspot tables to Fivetran, and that table was one of the ones that we can see when we use a tool to look at our Fivetran data. I am looking for a way to import that table automatically via API.

Dan

---

<div class="post-metadata">

**Author:** ![danr](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danr/32/13631_2.png) [@danr](https://community.hubspot.com/u/danr)\
**Post date:** [April 2, 2019, 5:04pm UTC](https://community.hubspot.com/t/email-campaign-table/13449/4 "2019-04-02T17:04:12Z")

</div>

This is how to do it -

Use this API call to get a list of all of the campaign IDs:

[https://api.hubapi.com/email/public/v1/campaigns/by-id?hapikey=key&limit=1000](https://api.hubapi.com/email/public/v1/campaigns/by-id?hapikey=key&limit=1000)

Then, call this one to grab the details from the email\_campaign table:

[https://api.hubapi.com/email/public/v1/campaigns/{campaign[‘id’]}?hapikey=key](https://api.hubapi.com/email/public/v1/campaigns/%7Bcampaign%5B'id'%5D%7D?hapikey=key)
