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.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Route-level reference for MainWP REST API v2 page endpoints, including page list, get, create, edit, status update, and delete.
{id_or_domain} accepts either a numeric site ID or a site domain.
| Method | Path | Purpose | Key Params |
|---|---|---|---|
| GET | /pages | List pages across selected sites | search, search_on, status, dtsstart, dtsstop, clients, groups, websites, maximum |
| GET | /pages/{id_or_domain}/{page_id} | Get one page | id_or_domain, page_id |
| PUT, PATCH | /pages/{id_or_domain}/{page_id}/update-status | Update only page status | status |
| PUT, PATCH | /pages/{id_or_domain}/{page_id}/edit | Edit page content/metadata | post_title, post_content, post_status, post_name, plus supported page fields |
| POST | /pages/{id_or_domain}/create | Create page | post_title, post_content, post_status, post_name |
| DELETE | /pages/{id_or_domain}/{page_id}/delete | Delete page | id_or_domain, page_id |
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://your-dashboard.com/wp-json/mainwp/v2/pages?clients=22&status=draft"
{
"success": 1,
"data": {
"https://example.com": [
{
"id": 58,
"post_title": "About",
"post_status": "draft"
}
]
}
}
curl -X PATCH \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"publish"}' \
"https://your-dashboard.com/wp-json/mainwp/v2/pages/12/58/update-status"
{
"success": 1,
"message": "Page status updated successfully."
}
