Tags Endpoints
FreshSource: MainWP Tags API
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /tags | List tags (pagination, search, include/exclude) |
| GET | /tags/{id} | Get single tag |
| POST | /tags/add | Create tag (name required, color optional) |
| POST/PUT/PATCH | /tags/{id}/edit | Update tag |
| DELETE | /tags/{id}/delete | Remove tag |
| GET | /tags/{id}/sites | Sites with this tag |
| GET | /tags/{id}/clients | Clients with tagged sites |
| POST | /tags/batch | Batch 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"