๐Ÿงช Tests and Simulations: Creating Custom API Endpoints, Testing OAuth Workflows, and Advanced Payment Automations

3. โž• Example: Creating a New Member (POST Request)

Description:

Here, you will create a new member using a POST request.

Steps:

  1. In Postman, set the request method to POST.
  2. Enter the URL:
    https://your-site.com/wp-json/mp/v1/members
  3. In the Authorization tab, select Bearer Token and add your API Key.
  4. Go to the Body tab and select raw with the format set to JSON.
  5. Enter the following JSON data to create a new member:
    { "username": "newmember", "email": "newmember@example.com", "password": "strongpassword123" }
  6. Click Send.

Expected Response:

You should see a confirmation with the details of the newly created member:

{
"id": 3,
"username": "newmember",
"email": "newmember@example.com",
"status": "active"
}