Skip to content

List sites in the current network

GET
/wp-json/wp2/site-manager/v1/sites
curl --request GET \
--url 'https://example.com/wp-json/wp2/site-manager/v1/sites?page=1&per_page=20&archived=0&deleted=0&spam=0&public=0&is_template=0&orderby=title&order=ASC' \
--header 'X-WP-Nonce: <X-WP-Nonce>'

Paginated list of sites in the current network (get_sites + Site Manager meta). Not a list of networks. Requires manage_network or manage_options. Without manage_network PHP limits the query to the current user’s sites (get_blogs_of_user → site__in); if none, items is empty. Multisite only: otherwise 400 not_multisite. Cookie + X-WP-Nonce or Application Password.

page
integer
default: 1

Page number, from 1. PHP: max(1, page).

per_page
integer
default: 20 <= 100

Sites per page. PHP: max(1, min(100, per_page ?: 20)).

search
string

get_sites['search'] string (core domain/path). Empty or omitted — no search.

status_id
integer

Filter by site meta wp2platform_site_status (Site Manager status term_id). Only values > 0 apply. Not WP_Site->public.

category_id
integer

Filter by site meta wp2platform_site_categories (LIKE on category id). Only values > 0 apply.

archived
integer
Allowed values: 0 1

WP_Site->archived flag for get_sites: 1 — archived only, 0 — non-archived only. Omit for no filter.

deleted
integer
Allowed values: 0 1

WP_Site->deleted flag in the blogs table (core marked the site deleted). Not “this API deleted the entity”.

spam
integer
Allowed values: 0 1

WP_Site->spam flag for get_sites: 1 — spam only, 0 — non-spam only. Omit for no spam filter.

public
integer
Allowed values: 0 1

WP_Site->public flag (site public/active in the network). Not a Site Manager status term. 1 or 0; omit for no filter.

is_template
integer
Allowed values: 0 1

Filter by site meta wp2platform_site_manager_is_template: 1 — duplication template, 0 — regular site.

orderby
string
Allowed values: title slug registered blog_id status_id id

Sort field. blog_id/id — id column; registered — WP_Site registration date; slug — path in get_sites; title and status_id are sorted in PHP after the query (blogname / status meta). Unknown key → id. PHP default is id. For title/status_id the network main site is pinned first.

order
string
Allowed values: ASC DESC

Sort direction. Any other value becomes DESC. Default DESC.

include
string

If the string contains stats, each SiteDto includes user_count (count_users on the site). Otherwise PHP omits the field. Other tokens are ignored.

Page of sites in the current network (items, total, page, per_page, total_pages).

Media typeapplication/json
object
items

Page of current-network sites after get_sites filters / PHP sorting.

Array<object>
object
blog_id

Site ID in the current network (WP_Site->blog_id). Path {blog_id} on the same operations is the same number.

integer
network_id

ID of the network the site belongs to (WP_Site->site_id). Not blog_id and not CreateNetworkRequest.domain.

integer
title

Site title — blog option blogname (get_option on this site). Not the network option site_name.

string
slug

Site address slug. On SUBDOMAIN_INSTALL — subdomain relative to the network domain; otherwise the WP_Site->path segment without slashes. PHP derives it in SiteSlugService::derive_slug_from_site.

string
domain

Site host in the blogs table (WP_Site->domain), without an https:// scheme.

string
path

Site path in the blogs table (WP_Site->path) with slashes (often / on subdomains or /training/ on subdirectory). Not a Local Sync file path.

string
description

Site tagline — blog option blogdescription.

string
status_id

Site Manager status taxonomy term ID (site meta wp2platform_site_status). null if unset or id=0.

integer
nullable
status

Expanded Site Manager status term. null if unset. Not the WP_Site->public flag.

object
id

Status term_id.

integer
name

Status display name.

string
slug

Status term slug (sanitize_title).

string
category_ids

Site Manager category term IDs (site meta wp2platform_site_categories).

Array<integer>
categories

Expanded site categories (id, name, slug). PHP does not include parent inside SiteDto.

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
site_url

Public site URL (get_site_url(blog_id)).

string format: uri
admin_url

This site’s wp-admin URL (get_admin_url(blog_id)), not /wp-admin/network/.

string format: uri
registered

Blog registration date (WP_Site->registered), as core stores it.

string format: date-time
last_updated

Blog last-updated date (WP_Site->last_updated).

string format: date-time
public

WP_Site->public flag (1 — public/active, 0 — unpublished). Not a Site Manager status term.

integer
archived

WP_Site->archived flag (1 — archived, 0 — not).

integer
deleted

WP_Site->deleted flag in the blogs table (core marked the site deleted). Not the result of this API’s DELETE.

integer
spam

WP_Site->spam flag (1 — marked as spam).

integer
mature

WP_Site->mature flag.

integer
is_main_site

True if this is the network main site (is_main_site(blog_id)). It cannot be deleted, archived, deactivated, or have its slug changed via this API (main_site_forbidden / main_site_slug_forbidden).

boolean
is_template

True if site meta wp2platform_site_manager_is_template is 1 (duplication template site).

boolean
user_count

User count on the site (count_users()['total_users']). PHP adds the field only if query include contains stats; otherwise the key is absent.

integer
total

Number of sites matching the filter (get_sites count or count after PHP title/status_id sort).

integer
page

Requested page (max(1, page)).

integer
per_page

Page size (max(1, min(100, per_page)), default 20).

integer
total_pages

ceil(total / per_page).

integer
Example
{
"items": [
{
"blog_id": 5,
"network_id": 1,
"title": "Training project",
"slug": "training",
"domain": "training.example.com",
"path": "/",
"description": "Course sandbox",
"status_id": 12,
"status": {
"id": 12,
"name": "In progress",
"slug": "in-progress"
},
"category_ids": [
3
],
"categories": [
{
"id": 3,
"name": "Training projects",
"slug": "training"
}
],
"site_url": "https://training.example.com/",
"admin_url": "https://training.example.com/wp-admin/",
"registered": "2024-03-01 10:15:00",
"last_updated": "2026-09-12 18:40:11",
"public": 1,
"archived": 0,
"deleted": 0,
"spam": 0,
"mature": 0,
"is_main_site": false,
"is_template": false
}
],
"total": 12,
"page": 1,
"per_page": 20,
"total_pages": 1
}

Not_multisite — not a multisite install.

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": {}
}

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 (rest_cookie_invalid_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": {}
}