up

Template

Actions related to full templates. User-owned or shared.

Get template

A template is the foundation of an email. This method facilitates working with templates. As a side-note: you can have {editable} sections in a template in which a 'message' is entered. See separate docuementation outside of the API for more information on how this works.

HTTP method: GET
http://api.sendcastle.com/v1/template/[123]
http://api.sendcastle.com/v1/template/[all]
cURL example
curl http://api.sendcastle.com/v1/template/[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: 'template.'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Identifier can be an integer or 'all'
  • No additional GET parameters required
  • No additional POST parameters required
  • No additional HTTP headers required
  • No extra security requirements
  • Requires read access
Change template

A template is the foundation of an email. This method facilitates working with templates. As a side-note: you can have {editable} sections in a template in which a 'message' is entered. See separate docuementation outside of the API for more information on how this works.

HTTP method: POST
http://api.sendcastle.com/v1/template/[123]
cURL example
curl http://api.sendcastle.com/v1/template/[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 template

A template is the foundation of an email. This method facilitates working with templates. As a side-note: you can have {editable} sections in a template in which a 'message' is entered. See separate docuementation outside of the API for more information on how this works.

HTTP method: PUT
http://api.sendcastle.com/v1/template/[123]
cURL example
curl http://api.sendcastle.com/v1/template/[123] \
	--data '{"name":"fnurt","__sourcetype__":"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: name, __sourcetype__
  • Requires create access
Delete template

A template is the foundation of an email. This method facilitates working with templates. As a side-note: you can have {editable} sections in a template in which a 'message' is entered. See separate docuementation outside of the API for more information on how this works.

HTTP method: DELETE
http://api.sendcastle.com/v1/template/[123]
cURL example
curl http://api.sendcastle.com/v1/template/[123] \
	--data '{"id":"fnurt"}' \
-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
  • Additional parameters required: id
  • Requires delete access
  • VC_VRO