Remove user from site
const url = 'https://example.com/wp-json/wp2/site-manager/v1/sites/1/users/1';const options = {method: 'DELETE', headers: {'X-WP-Nonce': '<X-WP-Nonce>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/wp-json/wp2/site-manager/v1/sites/1/users/1 \ --header 'X-WP-Nonce: <X-WP-Nonce>'Removes the user from the blog (remove_user_from_blog). The global WordPress account is not deleted.
Requires permission to manage the blog (for administrator on the site — same as add, `manage_network_users`/`manage_network`).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Site ID in the current network (WP_Site->blog_id).
WordPress user ID to remove from this site.
Responses
Section titled “Responses”User removed from the site.
object
Always true on HTTP 200.
Removed user ID (from the path).
Example
{ "removed": true, "user_id": 14}Not authenticated. DualRest: rest_forbidden (status 401) when there is no cookie session. Cookie + X-WP-Nonce or Application Password.
object
Machine-readable error or event code.
Message text (log, PIN, or password reset).
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}No permission on the blog (forbidden) or invalid REST nonce.
object
Machine-readable error or event code.
Message text (log, PIN, or password reset).
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}Site_not_in_network — site is not in the current network.
object
Machine-readable error or event code.
Message text (log, PIN, or password reset).
Extra WP_Error or license payload.
object
Examplegenerated
{ "code": "example", "message": "example", "data": {}}