up

Datasource

Actions related to raw recipient data such as importing.

Get datasource

A datasource is a list of recipients, either imported or built from list sign-ups within SendCastle. You can use as many datasources as you wish, in fact, we encourage using many datasources as the source of data is also information that can be used to segment with.

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

A datasource is a list of recipients, either imported or built from list sign-ups within SendCastle. You can use as many datasources as you wish, in fact, we encourage using many datasources as the source of data is also information that can be used to segment with.

HTTP method: POST
http://api.sendcastle.com/v1/datasource/import
cURL example
curl http://api.sendcastle.com/v1/datasource/import
\ -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 can be an integer, 'all' or one of the following: import
  • No additional parameters required, unless stated elsewhere
  • No extra security requirements
  • Requires write access
  • VC_VRO
Create datasource

A datasource is a list of recipients, either imported or built from list sign-ups within SendCastle. You can use as many datasources as you wish, in fact, we encourage using many datasources as the source of data is also information that can be used to segment with.

HTTP method: PUT
http://api.sendcastle.com/v1/datasource/import
cURL example
curl http://api.sendcastle.com/v1/datasource/import
\ --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 can be an integer, 'all' or one of the following: import
  • Requires create access
  • Additional parameters required: name
Delete datasource

A datasource is a list of recipients, either imported or built from list sign-ups within SendCastle. You can use as many datasources as you wish, in fact, we encourage using many datasources as the source of data is also information that can be used to segment with.

HTTP method: DELETE
http://api.sendcastle.com/v1/datasource/import
cURL example
curl http://api.sendcastle.com/v1/datasource/import
\ --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 can be an integer, 'all' or one of the following: import
  • Requires delete access
  • Additional parameters required: id
  • VC_VRO
Get datasource export

Export a datasource. An email will be sent to account holder when this action is done, in this mail there will also be a link to downloading the datasource.

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

Get a recipients from a datasource.

HTTP method: GET
http://api.sendcastle.com/v1/datasource/[xx]/recipient/[yy]
cURL example
curl http://api.sendcastle.com/v1/datasource/[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: 'datasource.recipient'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Identifier can be an integer or 'all'
  • No additional parameters required, unless stated elsewhere
  • No extra security requirements
  • Requires read access
Change fields in a datasource

In some cases it can come in handy to rename some fields of a datasource, or perhaps change the datatype of fields. Use this method to do so. Note: At the time of writing this is a GET request (and not a POST as it should be). This is subject to be fixed, but we will likely keep GET supported in version 1.

HTTP method: GET
http://api.sendcastle.com/v1/datasource/[xx]/modify/[yy]
cURL example
curl http://api.sendcastle.com/v1/datasource/[xx]/modify/[yy] \
	--data '{"new":"fnurt","type":"fnurt"}' \
-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: 'datasource.modify'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Parent identifier cannot be all
  • Additional parameters required: new, type
  • No extra security requirements
  • Requires write access
Get import information for a datasource

Some meta data is stored when you import data into SendCastle (such as original file name and similar).

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

Methods used for importing data into SendCastle. Importing recipient lists will generate a mail to the email address of the account.

HTTP method: PUT
http://api.sendcastle.com/v1/datasource/[xx]/import/[yy]
cURL example
curl http://api.sendcastle.com/v1/datasource/[xx]/import/[yy] \
	--data '{"name":"fnurt","originalfile":"fnurt","__uploadtype__":"fnurt","__uploaddata__":"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
  • Requires create access
  • Additional parameters required: name, originalfile, __uploadtype__, __uploaddata__
Change a datasource import

Methods used for importing data into SendCastle. Importing recipient lists will generate a mail to the email address of the account.

HTTP method: POST
http://api.sendcastle.com/v1/datasource/[xx]/import/[yy]
cURL example
curl http://api.sendcastle.com/v1/datasource/[xx]/import/[yy] \
	--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:
  • Parent identifier cannot be all
  • Requires write access
  • Additional parameters required: id
  • VC_VRO
Delete a datasource import

Methods used for importing data into SendCastle. Importing recipient lists will generate a mail to the email address of the account.

HTTP method: DELETE
http://api.sendcastle.com/v1/datasource/[xx]/import/[yy]
cURL example
curl http://api.sendcastle.com/v1/datasource/[xx]/import/[yy] \
	--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 a datasource's organization properties

In SendCastle's UI you can organize messages, filters and datasources into folders and similar. This method facilitiates that functionality. It is probably of little use to external applications.

HTTP method: GET
http://api.sendcastle.com/v1/datasource/[xx]/organize/[yy]
cURL example
curl http://api.sendcastle.com/v1/datasource/[xx]/organize/[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: 'datasource.organize'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Requires read access
Change a datasource's organization properties

In SendCastle's UI you can organize messages, filters and datasources into folders and similar. This method facilitiates that functionality. It is probably of little use to external applications.

HTTP method: POST
http://api.sendcastle.com/v1/datasource/[xx]/organize/[yy]
cURL example
curl http://api.sendcastle.com/v1/datasource/[xx]/organize/[yy] \
	--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:
  • Parent identifier cannot be all
  • Requires write access
  • Additional parameters required: id
  • Parent identifier is primary identifier
  • VC_VRO
  • VC_VROCBZ
Create a datasource's organization properties

In SendCastle's UI you can organize messages, filters and datasources into folders and similar. This method facilitiates that functionality. It is probably of little use to external applications.

HTTP method: PUT
http://api.sendcastle.com/v1/datasource/[xx]/organize/[yy]
cURL example
curl http://api.sendcastle.com/v1/datasource/[xx]/organize/[yy] \
	--data '{"item":"fnurt","folder":"fnurt","sortorder":"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: item, folder, sortorder