Get Message HTML

GET https://restapi.actonsoftware.com/api/1/message/{MsgID}/{RecID}

This endpoint will return the HTML content of a message. (Sent, Draft, or Template)

Parameters

Name Parameter
Type
Allow
Multiple
Required/
Optional
Data Type Description
Authorization: Header False Required String Insert your generated access token.
("Bearer {access token}")
MsgID Path False Required String Specify the ID of the message.
RecID Path False Optional String To see the personalization of a specific record specify a recipient ID.

Response

<!DOCTYPE html>
<html>
<head>

<title>Message Preview</title>

<script src="/acton/ng-ui/vendor/jquery/jquery.min.js"></script>
<script>

	jQuery.noConflict();
	jQuery(document).ready(function($) {
		
		$('iframe').each(function() {
			$this = $(this);
			var source = $this.attr('src');
			var deSchemedSource = source.replace(/^{{Page.Scheme}}:/, "");
			if (deSchemedSource !== source) {
				$this.attr('src', deSchemedSource);
			}
		});
	});
		
</script>

<script type="text/javascript">

	$ = function (id)
		{
		return document.getElementById(id);
		};

	setSizes = function ()
		{
		var hh = window.innerHeight || document.body.clientHeight;
		var ww = window.innerWidth || document.body.clientWidth;
		
		$('textversioncontents').style.width   = (ww) + 'px';
		$('textversioncontents').style.height  = (hh) + 'px';
		
		$('htmlversion').style.width   = (ww) + 'px';
		$('htmlversion').style.height  = (hh) + 'px';
		};

	doOnLoad = function ()
		{
		$('textversion').style.display = 'none';
		$('htmlversion').style.display = '';
		
		setSizes();
		};

	showText = function ()
		{
		$('textversion').style.display = '';
		$('htmlversion').style.display = 'none';
		};
		
	showHTML = function ()
		{
		$('textversion').style.display = 'none';
		$('htmlversion').style.display = '';
		};

</script>
<style type="text/css">
	html{ height: 100%; }
	body{ min-height: 100%; }
</style>

</head>
<body onLoad="doOnLoad()" onResize="setSizes()" style="margin: 0px; overflow-x: hidden">

	<div id="textversion" style="display: none">
		<textarea readonly id="textversioncontents" wrap="soft"
			style="border: 0px; padding-left: 10px; width: 100%; height: 1024px; overflow: auto; background-color: #FFFFCC; font-family: 'Courier New',Courier; font-size: 12px">
		
htmlhere
--------------------------------------------------------------------------------
Copyright (c) 2019 Act-On Software
Our address is 121 SW Morrison St #1600, Portland, Oregon 97204
 
If you do not wish to receive future email, click here:
http://kyleci61.actonservice.com/acton/rif/{{Env.AccountId}}/{{Env.MsgId}}/-/{{Env.RecId}}/{{Env.SrcId}}/zout
(You can also send your request to Customer Care at the street address above.)

		</textarea>
	</div>
	<div id="htmlversion" style="overflow: auto; display: none">
		
<html>
<head>
<META HTTP-EQUIV="expires" VALUE="Sat, 1 Jan 2000 11:00:00 GMT">
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<link rel="shortcut icon" type="image/x-icon" href="/acton/image/favicon.png" />
<link rel="icon" type="image/x-icon" href="/acton/image/favicon.png" />
</head>
<body>
	
<style type="text/css">
	a[href^="x-apple-data-detectors:"],	a[href^="tel:"] {
		color: inherit;
		font-size: inherit;
		font-family: inherit;
		text-decoration: inherit;
	}
</style>
			
htmlhere

Copyright &copy; 2019 &lrm;Act-On Software&lrm;<br>Our address is &lrm;121 SW Morrison St #1600, Portland, Oregon 97204&lrm;<br>&nbsp;<br>If you do not wish to receive future email, <a class="msgFooter" href="javascript:showMsg('Recipient clicks here to opt out')">click here</a>.<br>(You can also send your request to <b>Customer Care</b> at the street address above.)
			
</body>
</html>

	</div>
</body>

</html>

 

Code Examples

curl -X GET https://restapi.actonsoftware.com/api/1/message/d-0005 -H "Authorization: Bearer 12345678-9abc-defg-hijk-lmnopqrs"