The WordPress REST API allows you to get data in and out of your WordPress site. There are several built-in REST API methods offered in WordPress, each requiring proper authentication before information is received or distributed. Paid Memberships Pro extends on this API to add three additional REST API methods for interacting with your membership site data.

The REST API uses JSON objects to send and receive data in your WordPress site. Check out the REST API Handbook for more information about using this API to interact with your WordPress site.


  1. Check Permissions for the Requesting User: pmpro_rest_api_get_permissions_check

    This method allows you to verify that the authenticated user making the API request has the correct site permissions to retrieve the data. The default permission required to retrieve member data is the edit_users capability.


  2. Check a User’s Membership Level: pmpro_rest_api_get_user_level

    This method has one parameter required to retrieve a user’s membership level information:

    • user_id: the ID of the user whose membership level you want to check.

    If the method is successful in communicating with your site, you can expect a return value of the membership $level object for the user.

    Here is an example URL you could hit to make a user level check request: http://example.com/wp-json/wp/v2/users/2/pmpro_membership_level. In this example, we are passing the user ID and the method name.


  3. Check a User’s Access to a Post: pmpro_rest_api_get_has_membership_access

    This method has two parameters required to test whether the user has access to the specific content.

    • post_id: the ID of the post you are checking access for.
    • user_id: the ID of the user whose membership level you want to check.

    If the method is successful in communicating with your site, you can expect a return value of true or false, confirming or denying that the user has access to that piece of content.

    Here is an example URL you could hit to make an access-check request: http://example.com/wp-json/wp/v2/posts/58/user_id/2/pmpro_has_membership_access. In this example, we are passing the post ID, user ID and the method name.


These methods are defined in the includes/rest-api.php file of the plugin.