Create Email using contact from crm through API

Hi,

I want to ganerate emails from contacts of my crm users/owners

i found the api end point but i think i will need more data to send like email id

Example POST URL:
https://api.hubapi.com/marketing-emails/v1/emails?hapikey=demo

Example POST body:
{
“name”: “My first API marketing email!”,
“subject”: “Sample subject line”
}

Hi @ashuuas

Thank you for reaching out.

I want to tag some of our experts on this - @himanshurauthan @miljkovicmisa do you have any thoughts for @ashuuas on this?

Thank you!

Best

Tiphaine

Hi,

I want to ganerate emails from contacts of my crm users/owners

i found the api end point but i think i will need more data to send like email id

Example POST URL:
https://api.hubapi.com/marketing-emails/v1/emails?hapikey=demo

Example POST body:
{
“name”: “My first API marketing email!”,
“subject”: “Sample subject line”
}

Hello @TitiCuisset and @ashuuas,

The endpoint (https://api.hubapi.com/marketing-emails/v1/emails?hapikey=demo) you are using is correct for creating a marketing email, but if you want to send the same emails to some users then you can use this API (https://legacydocs.hubspot.com/docs/methods/email/transactional_email/single-send-overview).

From here you can send emails to users, you just need to fetch the email’s internal ID from the response body of the email that you have just created and use that email in the sending API.

Best Regards,