Skip to content

Check site slug availability

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

Normalizes the proposed site address and checks whether the domain+path pair is free in the current network (domain_exists).

    Query `slug` is required. `exclude_blog_id` — do not treat this blog_id as a conflict (rename check: if the address already belongs to that site, `available=true`).

    Requires `create_sites` or `manage_network`. Multisite only.
slug
required
string

Proposed address: subdomain (SUBDOMAIN_INSTALL) or path segment. PHP runs SlugNormalizer and builds domain+path for the current network without auto_increment.

exclude_blog_id
integer

Blog_id that should not count as taken. If domain_exists returned this id — available=true. 0 / non-numeric — treated as omitted. Used when renaming an existing site.

Normalized slug and available flag. Empty slug after normalize → available=false, slug=“”.

Media typeapplication/json
object
available

True if the domain+path pair is free in the current network (domain_exists) or already belongs to exclude_blog_id. false if the slug is empty after normalize, the network does not resolve, or another site owns the address.

boolean
slug

Normalized slug after SlugNormalizer and prepare_domain_and_path without auto_increment. Empty string if the input slug was empty.

string
Example
{
"available": true,
"slug": "training"
}

Not_multisite — not a WordPress network.

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