GET /users
Returns a paginated list of users with profile details and available roles.Parameters
Page number. Defaults to
1.Users per page. Defaults to
20, maximum 100.Search term matched against login, email, and display name.
Filter by WordPress role slug (e.g.
editor, subscriber).Response
Total number of users matching the query.
Total number of pages.
All available WordPress roles as
{key, name} objects.POST /users/change-role
Changes the WordPress role for a user. You cannot change your own role.Parameters
ID of the user whose role to change.
Role slug to assign (e.g.
editor, author, subscriber). Must be a valid registered WordPress role.Response
Always
true on success.Confirmation message including the user’s display name and new role.
POST /users/login-as
Generates a single-use login URL to impersonate another user. The token embedded in the URL expires after 5 minutes and can only be used once.The login URL includes a
wmp_login_as parameter and a wmp_token parameter. When visited, WordPress switches the session to the target user. The original admin’s ID is stored in user meta to allow switching back.Parameters
ID of the user to impersonate. Cannot be the currently logged-in user.
Response
Always
true on success.Single-use login URL. Valid for 5 minutes. Redirect the browser to this URL to switch sessions.
Confirmation message with the target user’s display name.
DELETE /users/delete
Permanently deletes a user account. You cannot delete your own account.Parameters
ID of the user to delete.
ID of the user to reassign the deleted user’s posts to. If omitted, posts are deleted along with the user.
Response
Always
true on success.Confirmation message.
POST /users/rename
Changes theuser_login (username) of a user. WordPress does not expose a public API for changing usernames, so this endpoint performs a direct database update. You cannot rename your own account.
Parameters
ID of the user to rename.
New username. Must not contain spaces or invalid characters. Must be unique across all users.
Response
Always
true on success.Confirmation message.
The new username that was applied.
