/batch when you need one request to fan out into multiple controller actions.
Use the MainWP Postman collection as the source of truth for request and response schemas.
Global Batch Route
Global Batch Behavior
The global/batch controller is orchestration-focused:
- Supports grouped
createrequests forsites,clients, andtags - Supports additional site action arrays under
sitessuch assync,reconnect,disconnect,suspend,check,remove,security,plugins,themes,non-mainwp-changes - Enforces a request item limit (
mainwp_rest_batch_items_limit, default100)
create items and positive site IDs for the additional site actions. A malformed group or unsupported action returns a group-level rest_invalid_param error, and that group is not executed.
The global endpoint rejects updates, costs, and unknown groups with rest_batch_group_not_supported. Use Updates Endpoints for updates and /costs/batch for cost operations. Inspect the returned groups and per-item errors even when the overall request returns HTTP 200; valid groups can still run alongside a rejected group.
Global Batch Example
adminpassword, uniqueid, or both.
Global vs Controller-Specific Batch
Use controller-specific batch endpoints when you need dedicated CRUD batching for that controller:/sites/batch/clients/batch/tags/batch/costs/batch
/batch when you need a single orchestrated request spanning multiple controller types.
