up

Account

Account related actions, such as sender domains and personal information.

Get account information

Account information contains information about the currently logged in user, such as contact address and other settings.

When getting account information you can pass in 'all', which will return the current logged in account's data.

HTTP method: GET
http://api.sendcastle.com/v1/account/[123]
http://api.sendcastle.com/v1/account/[all]
cURL example
curl http://api.sendcastle.com/v1/account/[123] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json"
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":{
		"emt_users":{
			"id":"1",
			"plan":"1",
			"currency":"EUR",
			"monthlyfee":"750",
			"per1kfee":"200",
			"enabled":"1",
			"frozen":"0",
			"avail_credits_free":"10000",
			"avail_credits_soft":"0",
			"avail_credits_hard":"0",
			"senderprofiles":"1",
			"monthlyfreemails":"0",
			"addresslists":"-1",
			"clearbigpurchases":"0",
			"expirydate":"2014-01-22 14:17:47",
			"nextbillingdate":"2014-01-22 14:17:47",
			"login":"hi@sendcastle.com",
			"company":"SendCastle",
			"name":"Bob Bobson",
			"street":"Streetname 123",
			"street2":"",
			"zipcode":"1234AB",
			"city":"Assen",
			"state":"Drenthe",
			"country":"NL",
			"vatnumber":"NL1234567890B123",
			"phone":"+31-6-12312312",
			"email":"hi@sendcastle.com",
			"role":"",
			"listsizelimit":"200000",
			"flags":"100...000",
			"timezone":"GMT",
			"autoapprovesend":"0",
			"autoapprovesendlimit":"5",
			"currentservertime":"1401016094"
		}
	}
}
Other constraints:
  • Identifier can be an integer or 'all'
  • No additional parameters required, unless stated elsewhere
  • No extra security requirements
  • Requires read access
Change account information

Account information contains information about the currently logged in user, such as contact address and other settings.

HTTP method: POST
http://api.sendcastle.com/v1/account/[123]
cURL example
curl http://api.sendcastle.com/v1/account/[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
  • Identifier should be UID
  • No additional parameters required, unless stated elsewhere
  • No extra security requirements
  • Requires write access
  • VC_VRO
get.account.freeze (!)

No description yet.

HTTP method: GET
http://api.sendcastle.com/v1/account/[xx]/freeze/[yy]
cURL example
curl http://api.sendcastle.com/v1/account/[xx]/freeze/[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: 'account.freeze'":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Parent identifier cannot be all
  • Identifier should be UID
  • Requires write access
Get sender domain information

Sender domain information contains data about the domains created by logged in user.

HTTP method: GET
http://api.sendcastle.com/v1/account/[xx]/domain/[yy]
cURL example
curl http://api.sendcastle.com/v1/account/[xx]/domain/[yy] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json"
Example of result
{
	"responseId":null,
	"version":1,
	"success":true,
	"data":{
		"emt_account_profiles":[
			{
				"id":"13871",
				"userid":"9017",
				"senderdomain":"example.com",
				"oursubdomain":"exampledomain",
				"theirsubdomain":"",
				"defaultfrom":"info@example.nl",
				"defaulttest":"person@example.com",
				"defaultsignature":"",
				"defaultlayout":"basic.fmt",
				"defaultindustry":"0",
				"defaultcommands":"[]"
			}
		]
	}
}
Other constraints:
  • Identifier can be an integer or 'all'
  • Parent identifier cannot be all
  • Requires read access
Create a sender domain

Sender domain information contains data about the domains created by logged in user.

HTTP method: PUT
http://api.sendcastle.com/v1/account/[xx]/domain/[yy]
cURL example
curl http://api.sendcastle.com/v1/account/[xx]/domain/[yy] \
	--data '{"senderdomain":"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: senderdomain
Change sender domain information

Sender domain information contains data about the domains created by logged in user.

HTTP method: POST
http://api.sendcastle.com/v1/account/[xx]/domain/[yy]
cURL example
curl http://api.sendcastle.com/v1/account/[xx]/domain/[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:
  • Identifier can be an integer or 'all'
  • Parent identifier cannot be all
  • Requires write access
  • Additional parameters required: id
  • VC_VRO
Delete a sender domain

Sender domain information contains data about the domains created by logged in user.

HTTP method: DELETE
http://api.sendcastle.com/v1/account/[xx]/domain/[yy]
cURL example
curl http://api.sendcastle.com/v1/account/[xx]/domain/[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 can be an integer or 'all'
  • Parent identifier cannot be all
  • Requires delete access
  • Additional parameters required: id
  • VC_VRO
Get domain ownership verification

In order to send from an email address you need to prove that it does indeed belong to you and can recieve mail. This method requests a verification mail.

HTTP method: GET
http://api.sendcastle.com/v1/account/[xx]/ownershipverification/[yy]
cURL example
curl http://api.sendcastle.com/v1/account/[xx]/ownershipverification/[yy] \
	--data '{"email":"fnurt"}' \
-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json"
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":{
		"n/a":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Parent identifier cannot be all
  • Requires write access
  • Additional parameters required: email
Get API access key

API access keys are used by external applications in order to be able to communicate with SendCastle (using this API).

HTTP method: GET
http://api.sendcastle.com/v1/account/[xx]/userkey/[yy]
cURL example
curl http://api.sendcastle.com/v1/account/[xx]/userkey/[yy] \
	-H "Authorization: Bearer YOUR_API_SECRET_HERE" \
-H "Content-Type: application/json"
Example of result
{
	"responseId":"50cef8fcaxxxx",
	"version":1,
	"success":true,
	"data":{
		"emt_userkey":{
		"id":"1",
		"xxx"
	}
}
Other constraints:
  • Parent identifier cannot be all
  • Requires read access
  • No additional parameters required, unless stated elsewhere
Create API access key

API access keys are used by external applications in order to be able to communicate with SendCastle (using this API).

HTTP method: PUT
http://api.sendcastle.com/v1/account/[xx]/userkey/[yy]
cURL example
curl http://api.sendcastle.com/v1/account/[xx]/userkey/[yy] \
	-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
  • No additional parameters required, unless stated elsewhere
Change API access key

API access keys are used by external applications in order to be able to communicate with SendCastle (using this API).

HTTP method: POST
http://api.sendcastle.com/v1/account/[xx]/userkey/[yy]
cURL example
curl http://api.sendcastle.com/v1/account/[xx]/userkey/[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:
  • Identifier can be an integer or 'all'
  • Parent identifier cannot be all
  • Requires write access
  • Additional parameters required: id
  • VC_VRO
Delete API access key

API access keys are used by external applications in order to be able to communicate with SendCastle (using this API).

HTTP method: DELETE
http://api.sendcastle.com/v1/account/[xx]/userkey/[yy]
cURL example
curl http://api.sendcastle.com/v1/account/[xx]/userkey/[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 can be an integer or 'all'
  • Parent identifier cannot be all
  • Requires delete access
  • Additional parameters required: id
  • VC_VRO