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 post endpoints, including post 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 | /posts | List posts across selected sites | search, search_on, status, dtsstart, dtsstop, clients, groups, websites, maximum, post_type |
| GET | /posts/{id_or_domain}/{post_id} | Get one post | id_or_domain, post_id |
| PUT, PATCH | /posts/{id_or_domain}/{post_id}/update-status | Update only post status | status |
| PUT, PATCH | /posts/{id_or_domain}/{post_id}/edit | Edit post content/metadata | post_title, post_content, post_status, post_name, plus supported post fields |
| POST | /posts/{id_or_domain}/create | Create post | post_title, post_content, post_status, post_name, optional media/tax fields |
| DELETE | /posts/{id_or_domain}/{post_id}/delete | Delete post | id_or_domain, post_id |
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"
}
]
}
}
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."
}
