API - application programming interface, which allows you to control software remotely, using a special set of commands (functions). I.e. API is a protocol, which is used to integrate one software with another (more detailed information can be found here).
Smartresponder's API allows you to manage your author account(s) remotely. It means that you don’t need to enter your account to execute recurring operations. Using API you can control your account on Smartresponder directly from your website, for example.
What do they use API for?
Usually API is used for systems integration in order to synchronize their work and exchange data automatically.
For example, let’s say you have user registration on your website and you want your users to be signed up for your newsletter automatically. API from Smartresponder will help you set up this process fast and easy.
API also is used to create different applications. This way you can develop your own application for Smartresponder and manage your newsletters without even visiting our website. Therefore, API provides fantastic possibilities and its scope of use is limitless.
Smartresponder's API will help our users to solve even the most uncommon tasks, while being fully integrated with our system. And the number of functions of our API will only grow with time.
API is a set of scripts, called via HTTP using POST method (in cases of queries, when no UTF-8 sensitive input data transfer is needed, method GET is allowed).
API is available to any user with paid account.
There are two ways of executing unauthorized access protection: Simple one, from the point of view of implementation on client’s side, implies transmission of password key within query. Second way is more complex, but more secure - transmission of a special variable in every query, which contains a checksum of all the parameters calculated by the MD5 algorithm. You can choose the protection method in personal account settings.
UTF-8 encoding is used for all incoming and outgoing API data.
Server's reply can come in XML or JSON format (is defined by a special variable in query). Every selection query can contain following parameters:
If you chose API key protection method, you will have to send this parameter in every query:
In case your situation requires a highly secured access, these parameters should be transmitted with every query:
<response> <result></result> <error code="" message=""/> <data> ... <data> </response>
S01. Basic methods
S0101. List of countries
S0201. Get newsletter list
S0202. Add/edit newsletter
S0203. Delete newsletter
S0204. Edit newsletter type
S0205. Add/edit follow-up template
S0301. Get file list
S0302. Upload/update file
S0303. Delete file
S0401. Get template list
S0402. Add/update template
S0403. Delete template
S0404. Attach file to a template
S0405. Remove file from a template
S0501. Get subscriber list
S0502. Add/edit subscriber
S0601. Subscribe to newsletter
S07. Group management
S0701. Get group list
S08. Channel management
S0801. Get channel list
S0802. Add/edit channel
S0803. Delete channel
S0901. Catalogue subject list
S1001. Get author info
Callbacks - it’s a special set of functions of our API, which helps you monitor important changes in your Smartresponder author account from other resource (your website, for example). E.g. you can monitor changes in your subscriber list, view number of subscribed and unsubscribed readers.
To run callbacks you need to specify URL of the script on your side, which will be processing requests of our server. You can indicate script URL in API tab of "Your account settings" section. After you click "Save" a test GET query with "action=test" variable will be performed. In order to be confirmed your script must return "TEST:OK" string.
Your script must return a following string "request ID:action code:OK" after every query. Otherwise, query will be considered failed and will be repeated every 5 minutes within next 24 hours. Action codes are listed in table below.
E.g., our service called your script through URL http://somesite.com/smart_callback.html?request_id=123&action=subscriber_added..., to confirm acceptance of our call, your script must return string "123:subscriber_added:ok".
Transferred data is encoded in UTF-8 and come as POST request. Every request contains following mandatory variables:
Variable action=subscriber_activated – subscriber was activated.