up

Message

Message related actions. A message can be a full template, a partial template (section) or e.g. the subject line of a mail. In short, a lot.

Get message

A message is a 'part' of an email. It can be an {editable} of a template, the subject-line or a from-address etc. This method facilitates working with these building-stones of a template.

HTTP method: GET
http://api.sendcastle.com/v1/message/[str]
cURL example
curl http://api.sendcastle.com/v1/message/[str] \
	-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: 'message.'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Identifier may be an array
  • Requires read access
Change message

A message is a 'part' of an email. It can be an {editable} of a template, the subject-line or a from-address etc. This method facilitates working with these building-stones of a template.

HTTP method: POST
http://api.sendcastle.com/v1/message/[123]
cURL example
curl http://api.sendcastle.com/v1/message/[123] \
	--data '{"id":"fnurt"}' \
-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json" \ -X POST
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":true
}
Other constraints:
  • Identifier should be an integer
  • Additional parameters required: id
  • No extra security requirements
  • Requires write access
  • VC_VRO
Create message

A message is a 'part' of an email. It can be an {editable} of a template, the subject-line or a from-address etc. This method facilitates working with these building-stones of a template.

HTTP method: PUT
http://api.sendcastle.com/v1/message/[123]
cURL example
curl http://api.sendcastle.com/v1/message/[123] \
	--data '{"segment":"fnurt","sectionname":"fnurt","type":"fnurt","message":"fnurt"}' \
-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json" \ -X PUT
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":{
		"id":"1"
	}
}
Other constraints:
  • Identifier should be an integer
  • Additional parameters required: segment, sectionname, type, message
  • Requires create access
Delete message

A message is a 'part' of an email. It can be an {editable} of a template, the subject-line or a from-address etc. This method facilitates working with these building-stones of a template.

HTTP method: DELETE
http://api.sendcastle.com/v1/message/[123]
cURL example
curl http://api.sendcastle.com/v1/message/[123] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json" \ -X DELETE
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":true
}
Other constraints:
  • Identifier should be an integer
  • No additional parameters required, unless stated elsewhere
  • Requires delete access
  • VC_VRO
Get message (brief version)

Brief messages are used to get ID's of messages (they can be pretty large). In some cases you do not want to download the full content.

HTTP method: GET
http://api.sendcastle.com/v1/message/[xx]/brief/[yy]
cURL example
curl http://api.sendcastle.com/v1/message/[xx]/brief/[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: 'message.brief'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Requires read access
Delete message link

A 'message link' is a method to link a message to a segment.

HTTP method: DELETE
http://api.sendcastle.com/v1/message/[xx]/link/[yy]
cURL example
curl http://api.sendcastle.com/v1/message/[xx]/link/[yy] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json" \ -X DELETE
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":true
}
Other constraints:
  • Identifier should be an integer
  • No additional parameters required, unless stated elsewhere
  • Requires delete access
  • VC_VRO