up

Form

Actions related to HTML forms.

Get form

Sign up forms are used to collect information about recipients. This method facilitiates working with these forms.

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

Sign up forms are used to collect information about recipients. This method facilitiates working with these forms.

HTTP method: POST
http://api.sendcastle.com/v1/form/[123]
cURL example
curl http://api.sendcastle.com/v1/form/[123] \
	--data '{"name":"fnurt","accountprofile":"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: name, accountprofile
  • No extra security requirements
  • Requires write access
  • VC_VRO
Create form

Sign up forms are used to collect information about recipients. This method facilitiates working with these forms.

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

Sign up forms are used to collect information about recipients. This method facilitiates working with these forms.

HTTP method: DELETE
http://api.sendcastle.com/v1/form/[123]
cURL example
curl http://api.sendcastle.com/v1/form/[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
  • Requires delete access
  • Additional parameters required: id
  • VC_VRO
Get preview of form

Used to get a rendered preview of a sign-up form created in SendCastle.

HTTP method: GET
http://api.sendcastle.com/v1/form/[xx]/preview/[yy]
cURL example
curl http://api.sendcastle.com/v1/form/[xx]/preview/[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: 'form.preview'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Parent identifier cannot be all
  • Requires read access