Please note that this documentation is for expert developers only. You will need to hire our developer or a professional if you need any help with this.
This API Addon of the Simple Membership plugin enables certain remote actions via standard HTTP requests.
Table of Contents
- Download the API Addon
- Enabling the API
- Currently Supported Actions of the API
- Using the API to Create a Member Profile
- Using the API to Update a Profile
- Using the API to Query a Member Profile
- Using the Login API Endpoint
Download the API Addon
Download the free SWPM API Addon.
Enabling the API
When the Simple Membership API addon is active, you can access the settings of this addon from the following interface:
Simple Membership -> Settings -> Addons Settings -> API Addon Settings
The following is a screenshot of the API settings menu:

Enable the API and take note of the API key so you can use it.
Currently Supported Actions of the API
This API addon currently supports the following actions:
- create – Create a new member profile.
- update – Update an existing member profile.
- query – Retrieve the details of an existing member profile.
- login – Perform a login action for a user.
Using the API to Create a Member Profile
Read this page for instructions on creating a member profile.
Using the API to Update a Profile
Read this page for instructions on updating a member profile.
Using the API to Query a Member Profile
Read this page for instructions on querying a member profile.
To query an existing member profile, send an HTTP request (POST or GET) to the home URL of your WordPress installation (example: https://simple-membership-plugin.com).
Required parameters for the query API endpoint:
- swpm_api_action=query
- key=<the-api-key>
- email=<the-email-address-of-the-profile>
The ‘query’ endpoint can also be accessed using the ‘member_id’ parameter instead of the ’email’ parameter.
Query Profile Example
In order to query a member account via HTTP GET request, use the following format:
https://www.example.com/?key=422b82d368b982fc5a65ab&swpm_api_action=query&email=john.doe@gmail.com
OR the following (if you want to query by ‘member_id’ of the member):
https://www.example.com/?key=422b82d368b982fc5a65ab&swpm_api_action=query&member_id=1
Using the Login API Endpoint
To perform a user login via API, you need to send an HTTP POST request to the home URL of your WordPress installation (example: https://simple-membership-plugin.com).
Required parameters for the login API endpoint:
- swpm_api_action=login
- key=<the-api-key>
- username=<the-username>
- password=<the-password>
Login Action Example
In order to perform a login action for a member account via HTTP GET request, use the following format:
https://www.example.com/?key=422b82d368b2f2fc5a65ab3c&swpm_api_action=login&username=john&password=MyPass123
NOTE: For a successful login, the login() method will redirect the user to the appropriate page when the query is executed.