Site abilities can access only sites owned by the calling WordPress user when per-user mode is enabled (
mainwp_is_single_user is false). This also applies to administrators, site deletion, and plugin lists. Lists omit other users’ sites; direct requests return the same missing-site error as an unknown site, with the ability’s usual response format. Team Control permissions can limit access further, but cannot grant access to another user’s sites. Default single-user installations are unchanged.What You’ll Learn
- Listing, filtering, and retrieving site information
- Adding, updating, and deleting sites
- Managing site connectivity (sync, reconnect, disconnect, suspend)
- Managing plugins and themes on individual sites
- Retrieving security, change logs, and cost data
mainwp/list-sites-v1
List MainWP child sites with pagination and filtering. Method: GET (readonly)
Response:
mainwp/get-site-v1
Get detailed information about a single site. Method: GET (readonly)
Response:
mainwp/sync-sites-v1
Trigger synchronization for one or more sites. Operations with more than 200 sites are queued for background processing. Method: POST
Response (Immediate - 200 sites or fewer):
queued is true, send an authenticated GET to status_url using your WordPress Application Password. The URL includes input[job_id]. See Batch Operations for a polling example and response.
mainwp/add-site-v1
Add a new MainWP child site. Method: POST
MainWP Child requires at least one connection authentication method. Provide
adminpassword, uniqueid, or both according to the child site’s MainWP Child settings.
Keep certificate verification enabled and use HTTPS when connecting with an administrator password. Leave ssl_version at 0 unless your host requires a specific cURL SSL version.
Omitting
verify_certificate uses the Dashboard’s global certificate setting during registration and later connections. Explicit choices are saved for that site. Existing sites keep their saved settings. Use verify_certificate for this ability; ssl_verify is not an accepted input name.get-site-v1).
mainwp/update-site-v1
Update an existing site’s properties. Method: POST
Response:
Returns the updated site object.
mainwp/delete-site-v1
Delete a site from MainWP. This is a destructive operation that requires confirmation. Method: POST
Response:
mainwp/reconnect-site-v1
Reconnect a single disconnected site. Method: POST
Response:
mainwp/disconnect-site-v1
Disconnect a site. The site remains in the database but communication is disabled. Method: POST
Response:
mainwp/suspend-site-v1
Suspend a site. Suspended sites are excluded from sync and update operations. Method: POST
Response:
mainwp/unsuspend-site-v1
Unsuspend a previously suspended site. Method: POST
Response:
mainwp/check-site-v1
Check connectivity status of a single site. Method: POST
Response:
mainwp/get-site-plugins-v1
Get list of plugins installed on a child site. Method: GET (readonly)
Response:
Preview Plugin and Theme Changes
Starting with MainWP Dashboard 6.4.1,mainwp/activate-site-plugins-v1, mainwp/deactivate-site-plugins-v1, and mainwp/activate-site-theme-v1 accept dry_run: true to preview changes. With MainWP MCP, review and confirm the preview before the change runs. With direct Abilities API calls, omitting dry_run applies the change immediately and confirm remains optional for these three abilities.
mainwp/activate-site-plugins-v1
Activate plugins on a site. Method: POST Supports a preview. Setdry_run: true to see which plugins would change without contacting the Child Site, review the result, then send the same request with confirm: true. Requests without dry_run apply the change right away, so existing integrations keep working. Do not set both flags to true; the ability returns 400 with mainwp_invalid_input.
Preview the change:
After reviewing the preview, apply the change:
active is the last synced state. active and will_change are null when MainWP has no synced state for the plugin. count includes plugins already in the requested state.
Response:
mainwp/deactivate-site-plugins-v1
Deactivate plugins on a site. Method: POST Supports a preview. Setdry_run: true to see which plugins would change without contacting the Child Site, review the result, then send the same request with confirm: true. Requests without dry_run apply the change right away, so existing integrations keep working. Do not set both flags to true; the ability returns 400 with mainwp_invalid_input.
Preview the change:
After reviewing the preview, apply the change:
active is the last synced state. active and will_change are null when MainWP has no synced state for the plugin. count includes plugins already in the requested state.
Response:
mainwp/delete-site-plugins-v1
Delete plugins from a site. This is a destructive operation that requires confirmation. Method: POST
Response:
mainwp/get-site-themes-v1
Get list of themes installed on a child site. Method: GET (readonly)
Response:
mainwp/activate-site-theme-v1
Activate a theme on a site. Method: POST Supports a preview. Setdry_run: true to see which themes would change without contacting the Child Site, review the result, then send the same request with confirm: true. Requests without dry_run apply the change right away, so existing integrations keep working. Do not set both flags to true; the ability returns 400 with mainwp_invalid_input.
Preview the change:
After reviewing the preview, send the same request with
"confirm":true instead of "dry_run":true.
The preview response includes would_affect, count, and warnings, plus current_theme with the last synced active theme, or null when unknown.
Response:
mainwp/delete-site-themes-v1
Delete themes from a site. This is a destructive operation that requires confirmation. Method: POST
Response:
mainwp/get-abandoned-plugins-v1
Get list of abandoned plugins across all sites. Abandoned plugins have not received updates in 2+ years. Method: GET (readonly)
Response:
mainwp/get-abandoned-themes-v1
Get list of abandoned themes across all sites. Method: GET (readonly)
Response:
mainwp/get-site-security-v1
Get security information about a site. Method: GET (readonly)
Response:
mainwp/get-site-changes-v1
Get change/activity log for a site. Requires the Logs module to be active. Method: GET (readonly)
Response:
This ability requires the Logs module. If inactive, returns
mainwp_module_not_available error.mainwp/get-site-client-v1
Get the client associated with a site. Method: GET (readonly)
Response:
mainwp/get-site-costs-v1
Get cost tracking data for a site. Requires the Cost Tracker module to be active. Method: GET (readonly)
Response:
This ability requires the Cost Tracker module. If inactive, returns
mainwp_module_not_available error.mainwp/count-sites-v1
Get total count of sites. Method: GET (readonly)
Response:
mainwp/get-sites-basic-v1
Get minimal site information (ID, URL, name only) for all sites. Method: GET (readonly)mainwp/reconnect-sites-v1
Batch reconnect multiple disconnected sites. Method: POST
Response:
mainwp/disconnect-sites-v1
Batch disconnect multiple sites. Method: POST
Response:
mainwp/check-sites-v1
Batch connectivity check for multiple sites. Method: POST
Response:
mainwp/suspend-sites-v1
Batch suspend multiple sites. Method: POST
Response:
Related Resources
- Abilities API Overview - API basics and authentication
- Updates Abilities - Update management abilities
- Clients Abilities - Client management abilities
- REST API Sites - REST API alternative for site management
