Skip to content

Tags Endpoints

Fresh

Source: MainWP Tags API

Endpoints

MethodPathDescription
GET/tagsList tags (pagination, search, include/exclude)
GET/tags/{id}Get single tag
POST/tags/addCreate tag (name required, color optional)
POST/PUT/PATCH/tags/{id}/editUpdate tag
DELETE/tags/{id}/deleteRemove tag
GET/tags/{id}/sitesSites with this tag
GET/tags/{id}/clientsClients with tagged sites
POST/tags/batchBatch create/update/delete

Example: Batch Operations

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