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.
The per-user ownership rules apply to all site routes, including plugin lists and bulk operations. For example, if user B owns site
12, user A’s key requesting /sites/12/plugins receives that route’s normal not-found response. Lists omit site 12 for user A.Route Matrix
Global Site Routes
Per-Site Routes
Site Relationship Routes
When creating a site through REST API, the site URL and administrator username are always required. Include
adminpassword when Password Authentication is enabled on the child site, include uniqueid when Unique Security ID is enabled, or include both when both methods are enabled. MainWP Child no longer allows both Password Authentication and Unique Security ID to be disabled.Representative Requests
List Sites with Updates or Custom Fields
Usestatus=available_update on GET /sites to list sites with pending updates. In MainWP Dashboard 6.4.2 and later, this includes sites whose only updates are for premium plugins or themes.
With with_tags=false, full_data=false, include, or exclude, the total field counts the sites on the current page. The same applies when the Abilities API is unavailable. To paginate these results, send page and a fixed per_page value, such as 20. Increase page until data is empty.
Use custom_fields with a comma-separated list of field names to include additional values. You can combine it with include or exclude to limit the result by site ID. Field names can contain ASCII letters, digits, and underscores. MainWP skips unsupported names, such as license-key, and reserved names, such as health_site_status. Built-in values such as the site ID and URL take precedence.
Connection Input Types
When adding or editing sites, use the expected JSON types instead of relying on automatic conversion:
Omitting
force_use_ipv4 when adding a site uses the global setting for the connection attempt. Invalid values, such as 3 for force_use_ipv4 or null for ssl_verify, return HTTP 400. Check the error response for the affected parameter and correct it before retrying. Site creation inside /sites/batch and global /batch uses the same connection input validation.
Omitting
ssl_verify when adding a site uses the Dashboard’s global certificate setting during registration and later connections. Send "ssl_verify": true to require verification or "ssl_verify": false to turn it off. Explicit choices are saved for that site. Existing sites keep their saved settings.The legacy REST v1 add-site endpoint follows the same omission rule. For v1 JSON requests, send "ssl_verify": 1 to require verification or "ssl_verify": 0 to turn it off.Update Site Tags
Usegroupids when updating tags through /sites/{id_or_domain}/edit. It replaces the site’s tag assignments rather than adding to them.
Each ID must be a positive integer identifying an existing tag accessible to the authenticated API user. Duplicate IDs are removed, and spaces around IDs are allowed. Tag names, zero, negative IDs, nonexistent or inaccessible IDs, and empty entries such as
"3,,7" are rejected. The endpoint does not create tags.
tags, even with an empty value, or sending groupids as an array or another non-string type returns HTTP 400 with rest_invalid_param. Invalid tag IDs are checked before any site fields are saved and return success: 0, group_updated: false, and group_message explaining the failure.
Check the response body even when the HTTP status is 200. A successful tag update includes success: 1, group_updated: true, and group_message: "Tags updated successfully.".
If valid IDs pass validation but saving the tag assignments fails, other requested site fields may already have been saved. That response is:
success: 0 does not guarantee that the entire edit was rolled back.
