wordpress_delete_user
Delete a WordPress user (optionally reassign their posts).
wordpress_delete_user
Delete a user.
Parameters
3 parameters, 1 required.
| Name | Type | Required | What it is |
|---|---|---|---|
id | number | yes | User ID |
reassign | number | no | User ID to reassign posts to (optional) |
approval_token | string | no | Single-use approval token from a prior respira_approval_required response. Pass the token from data.approval_request.approval_token to complete the delete. |
Example call
The smallest valid call, with the required parameters only:
{
"name": "wordpress_delete_user",
"arguments": {
"id": 123
}
}
Response
{
"success": true,
"deleted": true,
"id": 55
}
What it changes
It removes or overwrites something on the site, so treat it as the careful kind of call. On a page or post the edit lands on a copy first. The live page changes only when a person approves the copy in wp-admin. Calling it twice with the same arguments leaves the site in the same state as calling it once. On a connection set to read-only it is refused with respira_scope_denied.
Availability
Works on any WordPress site, whichever page builder it uses. Available since Respira 1.0.0.
Notes
- Prefer reassigning content to an admin/editor instead of deleting posts
Example Prompts
- "Delete user 55 and reassign posts to user 1"
- "Remove the old contractor account"
Related Tools
Was this page helpful?