What You’ll Learn
- Listing, filtering, and retrieving tag information
- Creating, updating, and deleting tags
- Retrieving sites and clients associated with tags
mainwp/list-tags-v1
List MainWP tags with pagination and filtering. Method: GET (readonly)| Name | Type | Required | Default | Description |
|---|---|---|---|---|
page | integer | No | 1 | Page number |
per_page | integer | No | 20 | Items per page (max 100) |
search | string | No | "" | Search term |
include | array | No | [] | Tag IDs to include |
exclude | array | No | [] | Tag IDs to exclude |
mainwp/get-tag-v1
Get detailed information about a single tag. Method: POST| Name | Type | Required | Default | Description |
|---|---|---|---|---|
tag_id | integer | Yes | — | Tag ID |
mainwp/add-tag-v1
Create a new tag. Method: POST| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | — | Tag name |
color | string | No | — | Hex color code (e.g., #3498db) |
mainwp/update-tag-v1
Update an existing tag. Method: POST| Name | Type | Required | Default | Description |
|---|---|---|---|---|
tag_id | integer | Yes | — | Tag ID |
name | string | No | — | Tag name |
color | string | No | — | Hex color code |
mainwp/delete-tag-v1
Delete a tag. This is a destructive operation that requires confirmation. Method: POST| Name | Type | Required | Default | Description |
|---|---|---|---|---|
tag_id | integer | Yes | — | Tag ID |
confirm | boolean | Conditional | — | Required and must be true unless dry_run is true |
dry_run | boolean | No | false | Preview without deleting |
mainwp/get-tag-sites-v1
Get sites associated with a tag. Method: POST| Name | Type | Required | Default | Description |
|---|---|---|---|---|
tag_id | integer | Yes | — | Tag ID |
page | integer | No | 1 | Page number |
per_page | integer | No | 20 | Items per page |
mainwp/get-tag-clients-v1
Get clients associated with a tag (clients whose sites have this tag). Method: POST| Name | Type | Required | Default | Description |
|---|---|---|---|---|
tag_id | integer | Yes | — | Tag ID |
page | integer | No | 1 | Page number |
per_page | integer | No | 20 | Items per page |
Related Resources
- Abilities API Overview - API basics and authentication
- Sites Abilities - Site management abilities
- REST API Tags - REST API alternative for tags