Skip to main content
Use these endpoints to manage users across child sites from MainWP Dashboard.
Use the MainWP Postman collection as the source of truth for request and response schemas.
{id_or_domain} accepts either a numeric site ID or a site domain.

Route Matrix

MethodPathPurposeKey Params
GET/usersList users across selected sitesclients, groups, websites, search, roles
POST/users/createCreate user(s) on selected sitesusername, email, optional password, role, first_name, last_name, user_url, send_password, plus site filters
PUT, PATCH/users/{id_or_domain}/{user_id}/editEdit a user on one siteid_or_domain, user_id, editable profile fields
DELETE/users/{id_or_domain}/{user_id}/deleteDelete a user on one siteid_or_domain, user_id
PUT, PATCH/users/update-admin-passwordUpdate administrator password across selected sitespassword, plus clients/groups/websites filters
POST/users/importImport users from CSVcsv_file (multipart upload), optional has_header

CSV Import Format

/users/import expects a CSV with 10 columns per row:
  1. username
  2. email
  3. first_name
  4. last_name
  5. user_url
  6. password
  7. send_password (true/false)
  8. role (administrator, subscriber, editor, author, contributor)
  9. select_sites (semicolon-separated site URLs)
  10. select_groups (semicolon-separated group names)
If has_header=true (default), the first line is skipped.

Representative Requests

Create a user across selected sites

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "username":"editor01",
    "email":"[email protected]",
    "role":"editor",
    "send_password":true,
    "websites":"12,19"
  }' \
  "https://your-dashboard.com/wp-json/mainwp/v2/users/create"
{
  "success": 1,
  "message": "Users created successfully."
}

Update admin password for selected sites

curl -X PUT \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "password":"S3cure-Pass-2026",
    "groups":"production"
  }' \
  "https://your-dashboard.com/wp-json/mainwp/v2/users/update-admin-password"
{
  "success": 1,
  "message": "Administrator passwords updated successfully."
}

Import users via CSV

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "[email protected]" \
  -F "has_header=true" \
  "https://your-dashboard.com/wp-json/mainwp/v2/users/import"
{
  "total": 15,
  "success_count": 14,
  "failed_count": 1,
  "failed_users": [
    {
      "line_number": 8,
      "error": "Invalid email format."
    }
  ]
}