Table of Contents
This endpoint is deprecated in favor of the customers and memberships endpoints. This endpoint will not be removed, but it will no longer receive new features.
The member's route allows you to interact with the Restrict Content Pro members database to retrieve members, add new ones, update existing members, and delete members.
Get members
GET /wp-json/rcp/{version}/members/
Required parameters:
- None.
Optional parameters:
status
(string) - Retrieve only members with the specified status-
active
,pending
,cancelled
,expired
subscription
(int) - The subscription level ID from which to retrieve membersrecurring
(int) - Whether to include recurring or non-recurring members only-
1
,0
number
(int) - The total of members to retrieve per pageoffset
(int) - The number of members to skip (for pagination purposes)orderby
(string) - The field on which to order the members returned-
- Any field allowed to be passed to get_users()
order
(string) - The direction which to sort members-
ASC
,DESC
s
(string) - Search value, such as the name, email, or user login of the member
Get specific member
GET /wp-json/rcp/{version}/members/{member_id}
Required parameters:
id
- The member ID to retrieve. Can be passed in the URL or as part of the body.
Optional parameters:
- None.
New member
POST /wp-json/rcp/{version}/members/new
Required parameters:
login
(string) - The login name to assign to the newly created member account.email
(string) - The email address for the member account.
Optional parameters:
first_name
(string) - The member's first name.last_name
(string) - The member's last name.display_name
(string) - The account display name.password
(string) - Password to set on the account. Randomly generated if omitted.status
(string) - The subscription status to assign to the member.expiration
(string) - The expiration date to assign to the member in MySQL format.subscription
(int) - The subscription level ID to assign to the member.profile_id
(string) - The payment profile ID of the member.recurring
(int) - Boolean flag that indicates if the subscription is recurring or one-time only.-
1
or0
Update member
POST /wp-json/rcp/{version}/members/update/{member_id}
Required parameters:
id
(int) - The ID of the member account to update. Can be passed in the URL or as part of the body.
Optional parameters:
email
(string) - The email address on the account.first_name
(string) - The member's first name.last_name
(string) - The member's last name.display_name
(string) - The account display name.password
(string) - Include only if changing the password.status
(string) - The subscription status to assign to the member.expiration
(string) - The expiration date to assign to the member in MySQL format.subscription
(int) - The subscription level ID to assign to the member.profile_id
(string) - The payment profile ID of the member.recurring
(int) - Boolean flag that indicates if the subscription is recurring or one-time only.-
1
or0
Delete member
DELETE /wp-json/rcp/{version}/members/delete
Required parameters:
id
(int) - The ID of the member account to delete
Optional parameters:
- None.