curl --request GET \
--url https://api.hubapi.com/marketing/v3/emails/{emailId}/revisions \
--header 'Authorization: Bearer <token>'{
"results": [
{
"id": "<string>",
"object": {
"activeDomain": "test.hs-sites.com",
"archived": false,
"campaign": "1b7f51a6-33c1-44d6-ba28-fe81f655dced",
"content": {
"flexAreas": {
"main": {
"boxed": false,
"isSingleColumnFullWidth": false,
"sections": [
{
"columns": [
{
"id": "column_1606761806181_0",
"widgets": [
"module_160676180617911"
],
"width": 12
}
],
"id": "section_1606761806181",
"style": {
"backgroundColor": "",
"backgroundType": "CONTENT"
}
},
{
"columns": [
{
"id": "column-0-1",
"widgets": [
"module-0-1-1"
],
"width": 12
}
],
"id": "section-0",
"style": {
"backgroundType": "CONTENT",
"paddingBottom": "40px",
"paddingTop": "40px"
}
},
{
"columns": [
{
"id": "column-1-1",
"widgets": [
"module-1-1-1"
],
"width": 12
}
],
"id": "section-1",
"style": {
"backgroundColor": "",
"backgroundType": "CONTENT",
"paddingBottom": "0px",
"paddingTop": "0px"
}
}
]
}
},
"plainTextVersion": "This is custom! View in browser ({{view_as_page_url}})\n\nHello {{ contact.firstname }},\n\nPlain text emails have minimal formatting so your reader can really focus on what you have to say. Introduce yourself and explain why you’re reaching out.\n\nEvery email should try to lead the reader to some kind of action. Use this space to describe why the reader should want to click on the link below. Put the link on its own line to really draw their eye to it.\n\nLink text\n\nNow it’s time to wrap up your email. Before your signature, thank the recipient for reading. You can also invite them to send this email to any of their colleagues who might be interested.\n\nAll the best,\n\nYour full name\n\nYour job title\n\nOther contact information\n\n{{site_settings.company_name}}, {{site_settings.company_street_address_1}}, {{site_settings.company_street_address_2}}, {{site_settings.company_city}}, {{site_settings.company_state}} {{site_settings.company_zip}}, {{site_settings.company_country}}, {{site_settings.company_phone}}\n\nUnsubscribe ({{unsubscribe_link_all}})\n\nManage preferences ({{unsubscribe_link}})",
"styleSettings": {},
"templatePath": "@hubspot/email/dnd/plain_text.html",
"widgets": {
"module-0-1-1": {
"body": {
"css_class": "dnd-module",
"html": "<p style=\"margin-bottom:10px;\">Hello {{ contact.firstname }},<br><br>Plain text emails have minimal formatting so your reader can really focus on what you have to say. Introduce yourself and explain why you’re reaching out.</p><p style=\"margin-bottom:10px;\">Every email should try to lead the reader to some kind of action. Use this space to describe why the reader should want to click on the link below. Put the link on its own line to really draw their eye to it.</p><p style=\"margin-bottom:10px;\"><a target=\"_blank\" rel=\"noopener\">Link text</a></p><p style=\"margin-bottom:10px;\">Now it’s time to wrap up your email. Before your signature, thank the recipient for reading. You can also invite them to send this email to any of their colleagues who might be interested.</p><p style=\"margin-bottom:10px;\">All the best,<br>Your full name<br>Your job title<br>Other contact information</p>",
"i18nKey": "richText.plainText",
"path": "@hubspot/rich_text",
"schema_version": 2
},
"child_css": {},
"css": {},
"id": "module-0-1-1",
"module_id": 1155639,
"name": "module-0-1-1",
"order": 2,
"styles": {},
"type": "module"
},
"module-1-1-1": {
"body": {
"align": "center",
"css_class": "dnd-module",
"font": {
"color": "#23496d",
"font": "Arial, sans-serif",
"size": {
"units": "px",
"value": 12
}
},
"link_font": {
"color": "#00a4bd",
"font": "Helvetica,Arial,sans-serif",
"size": {
"units": "px",
"value": 12
},
"styles": {
"bold": false,
"italic": false,
"underline": true
}
},
"path": "@hubspot/email_footer",
"schema_version": 2,
"unsubscribe_link_type": "both"
},
"child_css": {},
"css": {},
"id": "module-1-1-1",
"module_id": 2869621,
"name": "module-1-1-1",
"order": 3,
"styles": {},
"type": "module"
},
"module_160676180617911": {
"body": {
"font": {
"color": "#00a4bd",
"font": "Arial, sans-serif",
"size": {
"units": "px",
"value": 12
},
"styles": {
"bold": false,
"italic": false,
"underline": true
}
},
"hs_enable_module_padding": false,
"hs_wrapper_css": {}
},
"child_css": {},
"css": {},
"id": "module_160676180617911",
"module_id": 2794854,
"name": "module_160676180617911",
"styles": {},
"type": "module"
},
"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",
"order": 0,
"styles": {},
"type": "text"
}
}
},
"createdAt": "2020-11-30T18:43:17.136Z",
"createdById": 3739732,
"from": {
"fromName": "Bruce Wayne",
"replyTo": "[email protected]"
},
"id": "38175169118",
"isPublished": false,
"isTransactional": false,
"language": "en",
"name": "My subject",
"publishDate": "2020-11-30T18:44:20.387Z",
"sendOnPublish": true,
"state": "DRAFT",
"subcategory": "batch",
"subject": "My subject",
"subscriptionDetails": {
"officeLocationId": "5449392956"
},
"to": {
"contactIds": {},
"contactIlsLists": {
"exclude": [
1
],
"include": [
5
]
},
"suppressGraymail": true
},
"type": "BATCH_EMAIL",
"updatedAt": "2020-11-30T18:44:20.384Z",
"updatedById": 3739732,
"webversion": {
"expiresAt": "2020-11-30T18:44:20.387Z",
"metaDescription": "",
"redirectToPageId": 0,
"redirectToUrl": "http://www.example.org"
}
},
"updatedAt": "2023-11-07T05:31:56Z",
"user": {
"email": "<string>",
"fullName": "<string>",
"id": "<string>"
}
}
],
"total": 123,
"paging": {
"next": {
"after": "<string>",
"link": "<string>"
},
"prev": {
"before": "<string>",
"link": "<string>"
}
}
}マーケティングEメールの全てのバージョンのリストを取得し、各項目にその特定のバージョンの完全な状態を含めます。最新バージョンを表示するには、updatedAtパラメーターを基準に並べ替えます。
curl --request GET \
--url https://api.hubapi.com/marketing/v3/emails/{emailId}/revisions \
--header 'Authorization: Bearer <token>'{
"results": [
{
"id": "<string>",
"object": {
"activeDomain": "test.hs-sites.com",
"archived": false,
"campaign": "1b7f51a6-33c1-44d6-ba28-fe81f655dced",
"content": {
"flexAreas": {
"main": {
"boxed": false,
"isSingleColumnFullWidth": false,
"sections": [
{
"columns": [
{
"id": "column_1606761806181_0",
"widgets": [
"module_160676180617911"
],
"width": 12
}
],
"id": "section_1606761806181",
"style": {
"backgroundColor": "",
"backgroundType": "CONTENT"
}
},
{
"columns": [
{
"id": "column-0-1",
"widgets": [
"module-0-1-1"
],
"width": 12
}
],
"id": "section-0",
"style": {
"backgroundType": "CONTENT",
"paddingBottom": "40px",
"paddingTop": "40px"
}
},
{
"columns": [
{
"id": "column-1-1",
"widgets": [
"module-1-1-1"
],
"width": 12
}
],
"id": "section-1",
"style": {
"backgroundColor": "",
"backgroundType": "CONTENT",
"paddingBottom": "0px",
"paddingTop": "0px"
}
}
]
}
},
"plainTextVersion": "This is custom! View in browser ({{view_as_page_url}})\n\nHello {{ contact.firstname }},\n\nPlain text emails have minimal formatting so your reader can really focus on what you have to say. Introduce yourself and explain why you’re reaching out.\n\nEvery email should try to lead the reader to some kind of action. Use this space to describe why the reader should want to click on the link below. Put the link on its own line to really draw their eye to it.\n\nLink text\n\nNow it’s time to wrap up your email. Before your signature, thank the recipient for reading. You can also invite them to send this email to any of their colleagues who might be interested.\n\nAll the best,\n\nYour full name\n\nYour job title\n\nOther contact information\n\n{{site_settings.company_name}}, {{site_settings.company_street_address_1}}, {{site_settings.company_street_address_2}}, {{site_settings.company_city}}, {{site_settings.company_state}} {{site_settings.company_zip}}, {{site_settings.company_country}}, {{site_settings.company_phone}}\n\nUnsubscribe ({{unsubscribe_link_all}})\n\nManage preferences ({{unsubscribe_link}})",
"styleSettings": {},
"templatePath": "@hubspot/email/dnd/plain_text.html",
"widgets": {
"module-0-1-1": {
"body": {
"css_class": "dnd-module",
"html": "<p style=\"margin-bottom:10px;\">Hello {{ contact.firstname }},<br><br>Plain text emails have minimal formatting so your reader can really focus on what you have to say. Introduce yourself and explain why you’re reaching out.</p><p style=\"margin-bottom:10px;\">Every email should try to lead the reader to some kind of action. Use this space to describe why the reader should want to click on the link below. Put the link on its own line to really draw their eye to it.</p><p style=\"margin-bottom:10px;\"><a target=\"_blank\" rel=\"noopener\">Link text</a></p><p style=\"margin-bottom:10px;\">Now it’s time to wrap up your email. Before your signature, thank the recipient for reading. You can also invite them to send this email to any of their colleagues who might be interested.</p><p style=\"margin-bottom:10px;\">All the best,<br>Your full name<br>Your job title<br>Other contact information</p>",
"i18nKey": "richText.plainText",
"path": "@hubspot/rich_text",
"schema_version": 2
},
"child_css": {},
"css": {},
"id": "module-0-1-1",
"module_id": 1155639,
"name": "module-0-1-1",
"order": 2,
"styles": {},
"type": "module"
},
"module-1-1-1": {
"body": {
"align": "center",
"css_class": "dnd-module",
"font": {
"color": "#23496d",
"font": "Arial, sans-serif",
"size": {
"units": "px",
"value": 12
}
},
"link_font": {
"color": "#00a4bd",
"font": "Helvetica,Arial,sans-serif",
"size": {
"units": "px",
"value": 12
},
"styles": {
"bold": false,
"italic": false,
"underline": true
}
},
"path": "@hubspot/email_footer",
"schema_version": 2,
"unsubscribe_link_type": "both"
},
"child_css": {},
"css": {},
"id": "module-1-1-1",
"module_id": 2869621,
"name": "module-1-1-1",
"order": 3,
"styles": {},
"type": "module"
},
"module_160676180617911": {
"body": {
"font": {
"color": "#00a4bd",
"font": "Arial, sans-serif",
"size": {
"units": "px",
"value": 12
},
"styles": {
"bold": false,
"italic": false,
"underline": true
}
},
"hs_enable_module_padding": false,
"hs_wrapper_css": {}
},
"child_css": {},
"css": {},
"id": "module_160676180617911",
"module_id": 2794854,
"name": "module_160676180617911",
"styles": {},
"type": "module"
},
"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",
"order": 0,
"styles": {},
"type": "text"
}
}
},
"createdAt": "2020-11-30T18:43:17.136Z",
"createdById": 3739732,
"from": {
"fromName": "Bruce Wayne",
"replyTo": "[email protected]"
},
"id": "38175169118",
"isPublished": false,
"isTransactional": false,
"language": "en",
"name": "My subject",
"publishDate": "2020-11-30T18:44:20.387Z",
"sendOnPublish": true,
"state": "DRAFT",
"subcategory": "batch",
"subject": "My subject",
"subscriptionDetails": {
"officeLocationId": "5449392956"
},
"to": {
"contactIds": {},
"contactIlsLists": {
"exclude": [
1
],
"include": [
5
]
},
"suppressGraymail": true
},
"type": "BATCH_EMAIL",
"updatedAt": "2020-11-30T18:44:20.384Z",
"updatedById": 3739732,
"webversion": {
"expiresAt": "2020-11-30T18:44:20.387Z",
"metaDescription": "",
"redirectToPageId": 0,
"redirectToUrl": "http://www.example.org"
}
},
"updatedAt": "2023-11-07T05:31:56Z",
"user": {
"email": "<string>",
"fullName": "<string>",
"id": "<string>"
}
}
],
"total": 123,
"paging": {
"next": {
"after": "<string>",
"link": "<string>"
},
"prev": {
"before": "<string>",
"link": "<string>"
}
}
}サポートされる製品
必須スコープ
The access token received from the authorization server in the OAuth 2.0 flow.
マーケティングEメールID。
次の結果のセットを取得するためのカーソルトークン値。これはその他の結果が含まれるページ付けされたレスポンスの「paging.next.after」JSONプロパティーから取得できます。
前の結果のセットを取得するためのカーソルトークン値。これはその他の結果が含まれるページ付けされたレスポンスの「paging.prev.before」JSONプロパティーから取得できます。
返す結果の最大数。デフォルト値は10です。