API is built on HTTP. Our API is RESTful. There is no need to learn yet another 3rd party library to use the API. You can use your favorite HTTP/REST library available for your programming language to make HTTP calls. You can also use our prepared libraries to use MailerSoft. All code examples will be using our prepared libraries.
All API requests should start with the following base part:
When you sign up for an account, you are given an API key. You authenticate to the MailerSoft API by providing your API key in the request. You can find your API key in page: Account & Settings » Account Settings
To authenticate you should pass
apiKey parameter in the request. When sending POST/PUT/DELETE requests you can pass
apiKey parameter together with other parameters. It is not necessary to pass it as GET parameter.
You can try the following API call right in your browser:
Warning Keep your API key secret!
POST requests that are made to MailerSoft must have header
Content-Type: application/x-www-form-urlencoded value and the data should be formatted respectively. All responses from MailerSoft are in JSON format. There is an option to use XML format instead of JSON. Just add
.xml to your request link and all responses will be in XML, e.g.
If you are using XML format your requests should be enclosed in
<request> element. All responses received will be in
PHP library which implements the complete functionality of the MailerSoft REST API. Examples how to use it are shown next to every function in documentation.
MailerSoft uses standard HTTP response codes.
|200||Everything is OK|
|400||Missing a required parameter or calling invalid method|
|401||Invalid API key provided|
|404||Can't find requested items|