Skip to content

List site categories

GET
/wp-json/wp2/site-manager/v1/categories
curl --request GET \
--url https://example.com/wp-json/wp2/site-manager/v1/categories \
--header 'X-WP-Nonce: <X-WP-Nonce>'

Site Manager category taxonomy catalog (hide_empty=false), not post categories. Requires manage_network or manage_options.

Array of CategoryDto (id, name, slug, parent).

Media typeapplication/json
Array<object>
object
id

Site category term_id (Site Manager taxonomy, not post categories).

integer
name

Term display name. In the list PHP may rewrite default labels via translate_default_term_label.

string
slug

Category term slug (sanitize_title on write).

string
parent

Parent term_id (WP_Term->parent); 0 — root. PHP omits this field in SiteDto.categories.

integer
Example
[
{
"id": 3,
"name": "Training projects",
"slug": "training",
"parent": 0
}
]

Not authenticated. DualRest: rest_forbidden (status 401) when there is no cookie session. Cookie + X-WP-Nonce or Application Password.

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}

Missing manage_network/manage_options or invalid REST nonce.

Media typeapplication/json
object
code

Machine-readable error or event code.

string
message

Message text (log, PIN, or password reset).

string
data

Extra WP_Error or license payload.

object
Examplegenerated
{
"code": "example",
"message": "example",
"data": {}
}