Skip to main content
Use these endpoints to manage posts on child sites from MainWP Dashboard.
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.

Route Matrix

MethodPathPurposeKey Params
GET/postsList posts across selected sitessearch, search_on, status, dtsstart, dtsstop, clients, groups, websites, maximum, post_type
GET/posts/{id_or_domain}/{post_id}Get one postid_or_domain, post_id
PUT, PATCH/posts/{id_or_domain}/{post_id}/update-statusUpdate only post statusstatus
PUT, PATCH/posts/{id_or_domain}/{post_id}/editEdit post content/metadatapost_title, post_content, post_status, post_name, plus supported post fields
POST/posts/{id_or_domain}/createCreate postpost_title, post_content, post_status, post_name, optional media/tax fields
DELETE/posts/{id_or_domain}/{post_id}/deleteDelete postid_or_domain, post_id

Representative Requests

List published posts from selected sites

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://your-dashboard.com/wp-json/mainwp/v2/posts?status=publish&websites=12,19&maximum=50"
{
  "success": 1,
  "data": {
    "https://example.com": [
      {
        "id": 341,
        "title": "Quarterly Report",
        "post_status": "publish"
      }
    ]
  }
}

Create a post on one site

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "post_title":"Release Notes",
    "post_content":"Content...",
    "post_status":"draft"
  }' \
  "https://your-dashboard.com/wp-json/mainwp/v2/posts/12/create"
{
  "success": 1,
  "message": "Create post successfully."
}