Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mainwp-mintlify-c0f00f42.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Use these endpoints to manage MainWP tags (site groups).
Use the MainWP Postman collection as the source of truth for request and response schemas.

Route Matrix

MethodPathPurposeKey Params
GET/tagsList tagspage, per_page, search, include, exclude
GET/tags/{id}Get one tagid
POST/tags/addCreate a tagname, optional color
POST, PUT, PATCH/tags/{id}/editEdit a tagname, optional color
DELETE/tags/{id}/removeDelete a tagid
GET/tags/{id}/sitesGet sites in a tagid
GET/tags/{id}/clientsGet clients linked through tagged sitesid
POST/tags/batchBatch tag create/update/deletecreate[], update[], delete[]

Representative Requests

Create a tag

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Production","color":"#7fb100"}' \
  "https://your-dashboard.com/wp-json/mainwp/v2/tags/add"
{
  "success": 1,
  "message": "Tag created successfully.",
  "data": {
    "id": 7,
    "name": "Production"
  }
}

Batch tags

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "create": [{"name":"VIP"}],
    "update": [{"id":7,"name":"Production Sites"}],
    "delete": [11]
  }' \
  "https://your-dashboard.com/wp-json/mainwp/v2/tags/batch"
{
  "create": [{"success": 1}],
  "update": [{"success": 1}],
  "delete": [{"success": 1}]
}