Newsletter core contains a set of API for coders which can be exposed as REST API with the free Newsletter REST API extension.
The legacy API are deprecated and they’re not part of the Newsletter plugin. To use them you need to install the free Newsletter API Addon and change the endpoints in this way. You can find the addon inside the “Addons” page in your Newsletter installation.
From: http://www.yourdomain.com/wp-content/plugins/newsletter/api/add.php
To: http://www.yourdomain.com/wp-content/plugins/newsletter-api/add.php
We strongly suggest to use the new REST API.
The API key
The API key is a secret sequence of characters that must be passed on while calling the externally exposed API of the Newsletter plugin. If that field is left empty, the API are disabled. The API are implemented with the code located in the “api” sub-folder if you need to look at it.
The API key must be passed on each HTTP call using the parameter named “nk”.
The API key can be set on main configuration panel.
Legacy calls
Add a Subscriber
To add a subscriber call with a POST (actually even the GET works…)
http://www.yourdomain.com/wp-content/plugins/newsletter-api/add.php
A subscriber is always added in confirmed status.
Parameters
nk is the API key (required)
ne is the email address (required)
nn is the first name
ns is the last name
nl is a | separated list of lists numbers
Example 1
http://www.yourdomain.com/wp-content/plugins/newsletter-api/add.php?nk=yoursecretkey &ne=stefano@thenewsletterplugin.com &nn=Stefano &ns=Lissa &nl=1|3
Delete a Subscriber
Subscribers are delete by email address with the call:
http://www.yourdomain.com/wp-content/plugins/newsletter-api/delete.php?nk=yoursecretkey
Parameters
ne is the email address (required)