GPLv3 or later
The plugin provides a REST API to phpList. Development by Sam Tuke, Michiel Dethmers. Based on work by Andreas Ek of Flowcom AB.
Note: This is an old, unfinished implementation of the REST API plugin v2. It will be removed soon. Instead, there is the new implementation in a separate repository
See also the API blueprint in the /docs folder
login : Login via the API
add : Insert a new subscriber with complete subscriber details
addEmailOnly : Insert a new subscriber with only an email address
getById : Get a subscriber by their ID
delete : Delete a subscriber by their ID
addSubscriber : Add subscriber to a list
phpList admin autentication is required. This can be completed via an API call, or via web form login. The session must be authenticated for plugin access.
All requests to the RESTAPI are made by method HTTP POST (GET is not allowed). Use of HTTPS is strongly recommended.
The URL for making API calls to this server is relative to the host server:
[phplist server address]/lists/admin/?page=call&pi=restapi2
For convenience, the automatically generated URL can be found in the phpList web interface once the REST API v2 Plugin is installed and enabled, via the System menu -> 'restapi2 - main' page.
Make test calls to the RESTAPI using a client such as Postman for Chrome/Chromium browsers, or CocaRestClient.
Implementation examples in PHP can be found in /docs/example.php
, and
in unit test cases.
Allowable API calls are defined in /whitelist.php
. Both sets of
actions (e.g. subscriber-related calls), and also individual calls (e.g.
delete subscriber) may be white or blacklisted.
The plugin uses phpList 4 as an external library for handling execution
of API calls. phpList4 settings can be added in config-phplist4.php
.
See the /docs
folder for detailed documentation on the structure and
usage of this plugin.
Report issues to the central phpList bug tracker.