curl --request GET \
--url https://api.hubapi.com/marketing/v3/emails/ \
--header 'Authorization: Bearer <token>'{
"paging": {
"next": {
"after": "MjA%3D",
"link": "https://api.hubapi.com/marketing/v3/emails/emails?after=MjA%3D"
},
"prev": {
"before": "MTA%3D",
"link": "https://api.hubapi.com/marketing/v3/emails/emails?after=MTA%3D"
}
},
"results": [
{
"activeDomain": "",
"archived": false,
"content": {
"templatePath": "generated_layouts/4701002617.html",
"widgets": {
"Social_Sharing": {
"body": {},
"child_css": {},
"css": {},
"id": "Social_Sharing",
"label": "Social Sharing",
"name": "Social_Sharing",
"type": "social_sharing"
},
"column1": {
"body": {
"html": ""
},
"child_css": {},
"css": {},
"id": "column1",
"label": "Column Above Body",
"name": "column1",
"type": "rich_text"
},
"hs_email_body": {
"body": {
"html": "<p>Hi {{contact.firstname}},</p>\n<p>This is an example of an email in HubSpot. You can add and format text, include your own images, and even personalize the message with details about the recipient, like their {{contact.company}} or {{contact.city}}.</p>\n<p>In HubSpot, the Email tool is closely linked with the <em>Lists</em> and <em>Workflows</em> tools. You can create a list of recipients on the \"Sending\" tab up above. If you want this email to be part of a nurturing series, you can make it part of a workflow.</p>\n<p>Need help? Check out the documentation on <a href=\"http://help.hubspot.com/articles/Tutorial/how-to-use-email-tool\">creating an email</a>, <a href=\"http://help.hubspot.com/articles/How_To_Doc/how-to-create-a-smart-list-in-hubspot\">creating a list</a>, or <a href=\"http://help.hubspot.com/articles/Tutorial/set-up-workflows\">creating a workflow</a>.</p>"
},
"child_css": {},
"css": {},
"id": "hs_email_body",
"label": "Main Email Body",
"name": "hs_email_body",
"type": "rich_text"
},
"logo_image": {
"body": {
"alt": "vast.png",
"height": 135,
"link": "",
"override_inherited_src": false,
"src": "",
"suppress_company_name": false,
"width": 413
},
"child_css": {},
"css": {},
"id": "logo_image",
"label": "Logo",
"name": "logo_image",
"type": "logo"
},
"module_148465958537693": {
"body": {
"html": "<h2>Something Powerful</h2>\n<h3>Tell The Reader More</h3>\n<p>The headline and subheader tells us what you're <a href=\"#\">offering</a>, and the form header closes the deal. Over here you can explain why your offer is so great it's worth filling out a form for.</p>\n<p>Remember:</p>\n<ul>\n<li>Bullets are great</li>\n<li>For spelling out <a href=\"#\">benefits</a> and</li>\n<li>Turning visitors into leads.</li>\n</ul>"
},
"child_css": {},
"css": {},
"id": "module_148465958537693",
"label": "Rich Text",
"name": "module_148465958537693",
"type": "rich_text"
},
"preview_text": {
"body": {
"value": ""
},
"child_css": {},
"css": {},
"id": "preview_text",
"label": "Preview Text <span class=help-text>This will be used as the preview text that displays in some email clients</span>",
"name": "preview_text",
"type": "text"
},
"social_sharing_label": {
"body": {},
"child_css": {},
"css": {},
"id": "social_sharing_label",
"label": "Social Sharing Label",
"name": "social_sharing_label",
"type": "text"
}
}
},
"createdAt": "2017-02-16T13:05:18.390Z",
"createdById": 2983922,
"from": {
"fromName": "Bruce Wayne",
"replyTo": "test@yahoo.com"
},
"id": "4613448134",
"isPublished": true,
"isTransactional": false,
"name": "Fail dmarc",
"sendOnPublish": true,
"state": "PUBLISHED",
"stats": {
"counters": {
"bounce": 1,
"click": 0,
"contactslost": 0,
"delivered": 0,
"dropped": 0,
"hardbounced": 0,
"notsent": 0,
"open": 0,
"pending": 0,
"reply": 0,
"selected": 1,
"sent": 1,
"softbounced": 1,
"spamreport": 0,
"suppressed": 0,
"unsubscribed": 0
},
"deviceBreakdown": {
"click_device_type": {
"computer": 0,
"mobile": 0,
"unknown": 0
},
"open_device_type": {
"computer": 0,
"mobile": 0,
"unknown": 0
}
},
"qualifierStats": {},
"ratios": {
"bounceratio": 100,
"clickratio": 0,
"clickthroughratio": 0,
"contactslostratio": 0,
"deliveredratio": 0,
"hardbounceratio": 0,
"notsentratio": 0,
"openratio": 0,
"pendingratio": 0,
"replyratio": 0,
"softbounceratio": 100,
"spamreportratio": 0,
"unsubscribedratio": 0
}
},
"subcategory": "batch",
"subject": "Subject",
"subscriptionDetails": {
"officeLocationId": "4701002382",
"subscriptionId": 1264909
},
"to": {
"contactIds": {
"include": [
51
]
},
"contactIlsLists": {},
"suppressGraymail": true
},
"type": "BATCH_EMAIL",
"updatedAt": "2017-02-16T13:08:24.853Z",
"updatedById": 2983922
}
],
"total": 1
}Die Ergebnisse können gefiltert werden, sodass nur spezifische E-Mails aufgeführt werden. Eine vollständige Liste der Filteroptionen finden Sie in der nachstehenden Tabelle.
curl --request GET \
--url https://api.hubapi.com/marketing/v3/emails/ \
--header 'Authorization: Bearer <token>'{
"paging": {
"next": {
"after": "MjA%3D",
"link": "https://api.hubapi.com/marketing/v3/emails/emails?after=MjA%3D"
},
"prev": {
"before": "MTA%3D",
"link": "https://api.hubapi.com/marketing/v3/emails/emails?after=MTA%3D"
}
},
"results": [
{
"activeDomain": "",
"archived": false,
"content": {
"templatePath": "generated_layouts/4701002617.html",
"widgets": {
"Social_Sharing": {
"body": {},
"child_css": {},
"css": {},
"id": "Social_Sharing",
"label": "Social Sharing",
"name": "Social_Sharing",
"type": "social_sharing"
},
"column1": {
"body": {
"html": ""
},
"child_css": {},
"css": {},
"id": "column1",
"label": "Column Above Body",
"name": "column1",
"type": "rich_text"
},
"hs_email_body": {
"body": {
"html": "<p>Hi {{contact.firstname}},</p>\n<p>This is an example of an email in HubSpot. You can add and format text, include your own images, and even personalize the message with details about the recipient, like their {{contact.company}} or {{contact.city}}.</p>\n<p>In HubSpot, the Email tool is closely linked with the <em>Lists</em> and <em>Workflows</em> tools. You can create a list of recipients on the \"Sending\" tab up above. If you want this email to be part of a nurturing series, you can make it part of a workflow.</p>\n<p>Need help? Check out the documentation on <a href=\"http://help.hubspot.com/articles/Tutorial/how-to-use-email-tool\">creating an email</a>, <a href=\"http://help.hubspot.com/articles/How_To_Doc/how-to-create-a-smart-list-in-hubspot\">creating a list</a>, or <a href=\"http://help.hubspot.com/articles/Tutorial/set-up-workflows\">creating a workflow</a>.</p>"
},
"child_css": {},
"css": {},
"id": "hs_email_body",
"label": "Main Email Body",
"name": "hs_email_body",
"type": "rich_text"
},
"logo_image": {
"body": {
"alt": "vast.png",
"height": 135,
"link": "",
"override_inherited_src": false,
"src": "",
"suppress_company_name": false,
"width": 413
},
"child_css": {},
"css": {},
"id": "logo_image",
"label": "Logo",
"name": "logo_image",
"type": "logo"
},
"module_148465958537693": {
"body": {
"html": "<h2>Something Powerful</h2>\n<h3>Tell The Reader More</h3>\n<p>The headline and subheader tells us what you're <a href=\"#\">offering</a>, and the form header closes the deal. Over here you can explain why your offer is so great it's worth filling out a form for.</p>\n<p>Remember:</p>\n<ul>\n<li>Bullets are great</li>\n<li>For spelling out <a href=\"#\">benefits</a> and</li>\n<li>Turning visitors into leads.</li>\n</ul>"
},
"child_css": {},
"css": {},
"id": "module_148465958537693",
"label": "Rich Text",
"name": "module_148465958537693",
"type": "rich_text"
},
"preview_text": {
"body": {
"value": ""
},
"child_css": {},
"css": {},
"id": "preview_text",
"label": "Preview Text <span class=help-text>This will be used as the preview text that displays in some email clients</span>",
"name": "preview_text",
"type": "text"
},
"social_sharing_label": {
"body": {},
"child_css": {},
"css": {},
"id": "social_sharing_label",
"label": "Social Sharing Label",
"name": "social_sharing_label",
"type": "text"
}
}
},
"createdAt": "2017-02-16T13:05:18.390Z",
"createdById": 2983922,
"from": {
"fromName": "Bruce Wayne",
"replyTo": "test@yahoo.com"
},
"id": "4613448134",
"isPublished": true,
"isTransactional": false,
"name": "Fail dmarc",
"sendOnPublish": true,
"state": "PUBLISHED",
"stats": {
"counters": {
"bounce": 1,
"click": 0,
"contactslost": 0,
"delivered": 0,
"dropped": 0,
"hardbounced": 0,
"notsent": 0,
"open": 0,
"pending": 0,
"reply": 0,
"selected": 1,
"sent": 1,
"softbounced": 1,
"spamreport": 0,
"suppressed": 0,
"unsubscribed": 0
},
"deviceBreakdown": {
"click_device_type": {
"computer": 0,
"mobile": 0,
"unknown": 0
},
"open_device_type": {
"computer": 0,
"mobile": 0,
"unknown": 0
}
},
"qualifierStats": {},
"ratios": {
"bounceratio": 100,
"clickratio": 0,
"clickthroughratio": 0,
"contactslostratio": 0,
"deliveredratio": 0,
"hardbounceratio": 0,
"notsentratio": 0,
"openratio": 0,
"pendingratio": 0,
"replyratio": 0,
"softbounceratio": 100,
"spamreportratio": 0,
"unsubscribedratio": 0
}
},
"subcategory": "batch",
"subject": "Subject",
"subscriptionDetails": {
"officeLocationId": "4701002382",
"subscriptionId": 1264909
},
"to": {
"contactIds": {
"include": [
51
]
},
"contactIlsLists": {},
"suppressGraymail": true
},
"type": "BATCH_EMAIL",
"updatedAt": "2017-02-16T13:08:24.853Z",
"updatedById": 2983922
}
],
"total": 1
}Unterstützte Produkte
Erforderliche Bereiche
The access token received from the authorization server in the OAuth 2.0 flow.
Der erforderliche Wert des Cursor-Tokens, damit die nächsten Ergebnisse abgerufen werden. Sie können diesen Wert aus der „paging.next.after“-JSON-Eigenschaft einer paginierten Antwort mit weiteren Ergebnissen abrufen.
Gibt an, ob archivierte E-Mails zurückgegeben werden sollen. Der Standardwert ist „false“ (falsch).
Filtern Sie nach Kampagnen-GUID. Alle E-Mails werden zurückgegeben, sofern nicht vorhanden.
Nur E-Mails zurückgeben, die nach dem angegebenen Zeitpunkt erstellt wurden.
Nur E-Mails zurückgeben, die genau zum angegebenen Zeitpunkt erstellt wurden.
Nur E-Mails zurückgeben, die vor dem angegebenen Zeitpunkt erstellt wurden.
Grenzen Sie die Antwort ein, damit nur diese angegebene Liste an Eigenschaften enthalten ist.
Berücksichtigen Sie Statistiken in E-Mails.
Filtern Sie nach veröffentlichten E-Mails/Entwurfs-E-Mails. Alle E-Mails werden zurückgegeben, sofern nicht vorhanden.
Die maximale Anzahl der Ergebnisse, die zurückgegeben werden. Standardwert: 100.
Schließen Sie die Namen aller zugeordneten Marketingkampagnen ein.
Gibt an, welche Felder zum Sortieren der Ergebnisse verwendet werden. Gültige Felder: „name“, „createdAt“, „updatedAt“, „createdBy“, „updatedBy“. „createdAt“ wird standardmäßig verwendet.
E-Mail-Typen, nach denen gefiltert werden soll. Es können mehrere Typen einbezogen werden. Falls nicht vorhanden, werden alle E-Mails zurückgegeben.
AB_EMAIL, AUTOMATED_AB_EMAIL, AUTOMATED_EMAIL, BATCH_EMAIL, BLOG_EMAIL, BLOG_EMAIL_CHILD, FEEDBACK_CES_EMAIL, FEEDBACK_CUSTOM_EMAIL, FEEDBACK_CUSTOM_SURVEY_EMAIL, FEEDBACK_NPS_EMAIL, FOLLOWUP_EMAIL, LEADFLOW_EMAIL, LOCALTIME_EMAIL, MANAGE_PREFERENCES_EMAIL, MARKETING_SINGLE_SEND_API, MEMBERSHIP_EMAIL_VERIFICATION_EMAIL, MEMBERSHIP_FOLLOW_UP_EMAIL, MEMBERSHIP_OTP_LOGIN_EMAIL, MEMBERSHIP_PASSWORD_RESET_EMAIL, MEMBERSHIP_PASSWORD_SAVED_EMAIL, MEMBERSHIP_PASSWORDLESS_AUTH_EMAIL, MEMBERSHIP_REGISTRATION_EMAIL, MEMBERSHIP_REGISTRATION_FOLLOW_UP_EMAIL, MEMBERSHIP_VERIFICATION_EMAIL, OPTIN_EMAIL, OPTIN_FOLLOWUP_EMAIL, RESUBSCRIBE_EMAIL, RSS_EMAIL, RSS_EMAIL_CHILD, SINGLE_SEND_API, SMTP_TOKEN, TICKET_EMAIL Nur E-Mails zurückgeben, die nach dem angegebenen Zeitpunkt zuletzt aktualisiert wurden.
Nur E-Mails zurückgeben, die genau zum angegebenen Zeitpunkt zuletzt aktualisiert wurden.
Nur E-Mails zurückgeben, die vor dem angegebenen Zeitpunkt zuletzt aktualisiert wurden.
Schließen Sie die Namen aller Workflows ein, die den zurückgegebenen E-Mails zugeordnet sind.