@cross-solution/strapi-plugin-listmonk
v0.0.6
Published
Creates subscribers in an Listmonk Server
Downloads
2
Readme
Strapi plugin listmonk
This plugin contains 2 controllers. One for creating a subscriber in a Listmonk server and one for retrieving the status of the created subscriber. offers 2 API
Install
yarn add @cross-solution/strapi-plugin-listmonk
Configuration
The default configuration is as follows (you must add it to ./config/plugin.js):
module.exports = {
// ...
bfa: {
enabled: true,
config: {
apiUrl: "https://admin:password@your-listmonk-dever/api", // credentials and URL of your listmonk API
lists: [ 1, 2 ] // Array of list of your listmonk
},
},
// ...
}
Controller
POST /listmonk/subscriber
curl -X POST -d "[email protected]" http://localhost:1337/listmonk/subscriber
returns the id of the created subscriber.
GET /listmonk/subscriber/:id
curl -X GET http://localhost:1337/listmonk/subscriber/12
returns the subsription_status of subscribed lists.
Example
curl -X POST -d "[email protected]" http://localhost:1337/listmonk/subscriber
69
curl -X GET http://localhost:1337/listmonk/subscriber/69
["unconfirmed","unconfirmed"]
Listmonk sends the verification email to the email. As soon the subscription is confirmed, endpoint returns "confirmed"
>curl -X GET http://localhost:1337/listmonk/subscriber/69
["confirmed","confirmed"]