APIs & Integrations

YUtkina
Member

How can I get campaign information?

Hi!

How can I get campaign information from my account (Marketing->Campaigns)? Which endpoint should I use and what I will see on the return response body?

0 Upvotes
2 Replies 2
CMcKay
Top Contributor

How can I get campaign information?

Hey @YUtkina and @TiphaineCuisset ,

 

So there is an api to get campaign information it's just in the legacy endpoints: https://legacydocs.hubspot.com/docs/methods/email/get_campaign_data

 

Basically you provide the id of the campaign (you can get this from the hubspot ui), and then the api will provide you with the details for that campaign. Example response: 

{
    "appId": 20185,
    "appName": "AbBatch",
    "contentId": 933742756,
    "counters": {
        "delivered": 1,
        "open": 1,
        "processed": 1,
        "sent": 1
    },
    "id": 13054799,
    "name": "Test AB (Variation) ",
    "numIncluded": 1,
    "numQueued": 1,
    "subType": "VariantB",
    "subject": "test",
    "type": "AB"
}

 

Let me know if you have any questions.

 

Carter McKay

TiphaineCuisset
Community Manager
Community Manager

How can I get campaign information?

Hi @YUtkina 

 

Thank you for reaching out.

 

I want to tag some of our experts here - @CMcKay @Teun do you have some advice for @YUtkina on this? 

 

Thank you!

Best

Tiphaine


Saviez vous que la Communauté est disponible en français?
Rejoignez les discussions francophones en changeant votre langue dans les paramètres !

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !


0 Upvotes