APIs & Integrations

kate4
Member

Creating a marketing automated email with the API

SOLVE

Hello! 
I'm trying to create the Marketing email via the Marketing Email API.

How can I set Automated status for it?
I am sending an email type: "AUTOMATED_EMAIL" but it doesn't help.

For example:
https://api.hubapi.com/marketing-emails/v1/emails?hapikey=key
{"name":"Test Email",
"subject":"Test Subject",
"emailType":"AUTOMATED_EMAIL",
"fromName":"Jhon Doe",
"templatePath":"test-template.html",
"replyTo":"test@gmail.com"}

kate4_1-1621007603667.png

 

 

0 Upvotes
1 Accepted solution
kate4
Solution
Member

Creating a marketing automated email with the API

SOLVE

Hi!

@tominal  Thank you for your attention!
I found a solution. It is necessary to send     "state" => "AUTOMATED_DRAFT"  in the request body.  Maybe it will help someone

View solution in original post

4 Replies 4
kate4
Solution
Member

Creating a marketing automated email with the API

SOLVE

Hi!

@tominal  Thank you for your attention!
I found a solution. It is necessary to send     "state" => "AUTOMATED_DRAFT"  in the request body.  Maybe it will help someone

tominal
Guide | Partner
Guide | Partner

Creating a marketing automated email with the API

SOLVE

Ah! Good catch.

 

I remember having to replace the emailType attribute when creating emails a while ago. I wish I had remembered that piece.


Thomas Johnson
Community Champion


Kahu Software LLC
A Texan HubSpot consulting firm
https://kahusoftware.com
tominal
Guide | Partner
Guide | Partner

Creating a marketing automated email with the API

SOLVE

Unfortunately no. That request looks correct though. Is the response giving you any errors? @kate4 


Thomas Johnson
Community Champion


Kahu Software LLC
A Texan HubSpot consulting firm
https://kahusoftware.com
dennisedson
HubSpot Product Team
HubSpot Product Team

Creating a marketing automated email with the API

SOLVE

@tominal , any chance you have played in this area?


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!