up

Preview

Used to preview a mail by segment, recipient etc

Get preview of mail

Used to get or send a preview of a mail, this can return a fully rendered version of a mail.

HTTP method: GET
http://api.sendcastle.com/v1/preview/[123]
http://api.sendcastle.com/v1/preview/[all]
cURL example
curl http://api.sendcastle.com/v1/preview/[123] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json"
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":{
		"UNKNOWN_RETURN_OBJECT: 'preview.'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Identifier can be an integer or 'all'
  • Requires read access
Get preview of mail to a recipient

Used to get or send a preview of a mail to a specific recipient, this can return a fully rendered version of a mail.

HTTP method: GET
http://api.sendcastle.com/v1/preview/[xx]/recipient/[yy]
cURL example
curl http://api.sendcastle.com/v1/preview/[xx]/recipient/[yy] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json"
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":{
		"UNKNOWN_RETURN_OBJECT: 'preview.recipient'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Requires read access
Get preview of mail in a segment

Used to get or send a preview of a mail in a specific segment, this can return a fully rendered version of a mail.

HTTP method: GET
http://api.sendcastle.com/v1/preview/[xx]/segment/[yy]
cURL example
curl http://api.sendcastle.com/v1/preview/[xx]/segment/[yy] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json"
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":{
		"UNKNOWN_RETURN_OBJECT: 'preview.segment'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Requires read access
Get preview by path

A path describes how segments are linked to eachother, and due to the ability to override messages in mails you may want to render a mail using an exact path. You will probably want to use the segment-path version of this method.

HTTP method: GET
http://api.sendcastle.com/v1/preview/[xx]/path/[yy]
cURL example
curl http://api.sendcastle.com/v1/preview/[xx]/path/[yy] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json"
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":{
		"UNKNOWN_RETURN_OBJECT: 'preview.path'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Requires read access
Get preview by segment path

A path describes how segments are linked to eachother, and due to the ability to override messages in mails you may want to render a mail using an exact path.

HTTP method: GET
http://api.sendcastle.com/v1/preview/[xx]/segmentpath/[yy]
cURL example
curl http://api.sendcastle.com/v1/preview/[xx]/segmentpath/[yy] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json"
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":{
		"UNKNOWN_RETURN_OBJECT: 'preview.segmentpath'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Requires read access
Get preview of template

Return a preview of a template. This can return a fully rendered version.

HTTP method: GET
http://api.sendcastle.com/v1/preview/[xx]/template/[yy]
cURL example
curl http://api.sendcastle.com/v1/preview/[xx]/template/[yy] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json"
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":{
		"UNKNOWN_RETURN_OBJECT: 'preview.template'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Requires read access