Skip to content

Sites Endpoints

Fresh

Source: MainWP Sites API

The {id_or_domain} parameter accepts either numeric site IDs or domain names.

Global Operations

MethodPathDescription
GET/sitesList sites with filtering
GET/sites/basicMinimal site data (ID, URL, name)
GET/sites/countTotal site count
POST/sites/addAdd new child site
POST/sites/batchBatch create/update/delete
POST/sites/syncBulk synchronization
POST/sites/reconnectBulk reconnect
POST/sites/disconnectBulk disconnect

Per-Site Operations

MethodPathDescription
GET/sites/{id_or_domain}Site details
PUT/PATCH/sites/{id_or_domain}/editUpdate site
DELETE/sites/{id_or_domain}/removeRemove site
POST/sites/{id_or_domain}/syncSync single site
POST/sites/{id_or_domain}/reconnectReconnect site
POST/sites/{id_or_domain}/disconnectDisconnect site
POST/sites/{id_or_domain}/suspendSuspend site
POST/sites/{id_or_domain}/checkTest connectivity

Plugin/Theme Management

MethodPathDescription
GET/sites/{id_or_domain}/pluginsList installed plugins
GET/sites/{id_or_domain}/themesList installed themes
POST/sites/{id_or_domain}/plugins/activateActivate plugins
POST/sites/{id_or_domain}/plugins/deactivateDeactivate plugins
POST/sites/{id_or_domain}/plugins/deleteDelete plugins
POST/sites/{id_or_domain}/themes/activateActivate theme
POST/sites/{id_or_domain}/themes/deleteDelete themes

Relationship Queries

MethodPathDescription
GET/sites/{id_or_domain}/clientClient association
GET/sites/{id_or_domain}/costsCost data
GET/sites/{id_or_domain}/securitySecurity snapshot

Example: List Sites

bash
curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://your-dashboard.com/wp-json/mainwp/v2/sites/basic"

Postman Collection

Use the MainWP Postman collection as the source of truth for request and response schemas.