up

Campaign

Campaign related actions; such as verifying a campaign for sending and actually sending it.

Get campaign

A campaign contains information such as name and various ID's required to get to more related information around a campaign.

HTTP method: GET
http://api.sendcastle.com/v1/campaign/[123]
http://api.sendcastle.com/v1/campaign/[all]
cURL example
curl http://api.sendcastle.com/v1/campaign/[123] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json"
Example of result
{
	"responseId":123456789,
	"version":1,
	"success":true,
	"data":{
		"emt_campaign":[
			{
				"id":"1",
				"owner":"1",
				"accountprofile":"1",
				"name":"SendCastle Newsletter",
				"description":"This is a low traffic newsletter.",
				"enabled":"1",
				"scheduled":"0",
				"archiveemail":null,
				"defaulttemplate":"102",
				"created":"2014-05-24 12:25:23",
				"deleted":"0",
				"thumbnail":"44364766.png",
				"archiveid":"123456789-1"
			},
			{
				"id":"2",
				"owner":"1",
				"accountprofile":"1",
				"name":"SendCastle announcements",
				"description":"A low traffic newsletter with important SendCastle announcements.",
				"enabled":"1",
				"scheduled":"0",
				"archiveemail":null,
				"defaulttemplate":"basic.fmt",
				"created":"2014-01-28 23:08:06",
				"deleted":"0",
				"thumbnail":null,
				"archiveid":"123456789-2"
			}
		]
	}
}
Other constraints:
  • Identifier can be an integer or 'all'
  • No additional parameters required, unless stated elsewhere
  • Requires read access
Create campaign

A campaign contains information such as name and various ID's required to get to more related information around a campaign.

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

A campaign contains information such as name and various ID's required to get to more related information around a campaign.

HTTP method: POST
http://api.sendcastle.com/v1/campaign/[123]
cURL example
curl http://api.sendcastle.com/v1/campaign/[123] \
	-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
  • No additional parameters required, unless stated elsewhere
  • No extra security requirements
  • Requires write access
  • VC_VRO
Delete campaign

A campaign contains information such as name and various ID's required to get to more related information around a campaign.

HTTP method: DELETE
http://api.sendcastle.com/v1/campaign/[123]
cURL example
curl http://api.sendcastle.com/v1/campaign/[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
  • No extra security requirements
  • Requires delete access
  • VC_VRO
Get campaign archive

Contains historical data about a campaign.

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

The campaign structure contains information about how segments are related to each other in a campaign.

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

Campaign messages are closely related to messages (they are the same thing). This is a subset of an accounts complete set of messages. Some of the campaign-message-methods are not implemented, in those cases you want to revert to using the ones under the Message API.

HTTP method: GET
http://api.sendcastle.com/v1/campaign/[xx]/message/[yy]
cURL example
curl http://api.sendcastle.com/v1/campaign/[xx]/message/[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: 'campaign.message'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Parent identifier cannot be all
  • No additional parameters required, unless stated elsewhere
  • Requires read access
Change campaign message

Campaign messages are closely related to messages (they are the same thing). This is a subset of an accounts complete set of messages. Some of the campaign-message-methods are not implemented, in those cases you want to revert to using the ones under the Message API.

HTTP method: POST
http://api.sendcastle.com/v1/campaign/[xx]/message/[yy]
cURL example
curl http://api.sendcastle.com/v1/campaign/[xx]/message/[yy] \
	--data '{"segmentmessageid":"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:
  • Parent identifier cannot be all
  • Additional parameters required: segmentmessageid
  • Requires write access
Delete campaign message

Campaign messages are closely related to messages (they are the same thing). This is a subset of an accounts complete set of messages. Some of the campaign-message-methods are not implemented, in those cases you want to revert to using the ones under the Message API.

HTTP method: DELETE
http://api.sendcastle.com/v1/campaign/[xx]/message/[yy]
cURL example
curl http://api.sendcastle.com/v1/campaign/[xx]/message/[yy] \
	--data '{"segmentmessagehack":"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:
  • Parent identifier cannot be all
  • Additional parameters required: segmentmessagehack
  • Requires write access
Create campaign message

Campaign messages are closely related to messages (they are the same thing). This is a subset of an accounts complete set of messages. Some of the campaign-message-methods are not implemented, in those cases you want to revert to using the ones under the Message API.

HTTP method: PUT
http://api.sendcastle.com/v1/campaign/[xx]/message/[yy]
cURL example
curl http://api.sendcastle.com/v1/campaign/[xx]/message/[yy] \
	--data '{"segment":"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:
  • Parent identifier cannot be all
  • Requires create access
  • Additional parameters required: segment, message
Get campaign verification result

Before a campaign can be scheduled it needs to pass a number of checks, use this method to get feedback on these checks.

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

A campaign archive contains a rendered version of sent batches (to a specific email address) from a campaign. The email address a campaign should use for archival can be set on the campaign itself.

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

No description yet.

HTTP method: PUT
http://api.sendcastle.com/v1/campaign/[xx]/send/[yy]
cURL example
curl http://api.sendcastle.com/v1/campaign/[xx]/send/[yy] \
	--data '{"timestamp":"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:
  • Parent identifier cannot be all
  • Requires create access
  • Additional parameters required: timestamp