hosting

POST /v1/index-monitoring/sitemap-preview

Count the pages a site's sitemap would add to index monitoring, before adding any.

All hosting endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The endpoint checks sites.view; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/index-monitoring/sitemap-preview \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "fqdn": <string> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

Reads the sitemap of fqdn (the one named in sitemap_url, or the usual /wp-sitemap.xml, /sitemap.xml, /sitemap_index.xml, one index level and up to ten child sitemaps) and answers which page paths on that host it lists, how many are already monitored, and how much room the plan has (room). It adds nothing: the dashboard shows this count first and then adds pages through createIndexMonitoringTarget, so the allowance, duplicate and row-ceiling rules apply to each page. A sitemap that cannot be read (none found, not on fqdn, not public, or too slow) answers 200 with sitemap_url: null, because a site with no sitemap is normal. paths is capped at the per-organisation target ceiling (500); found is the whole count. other_host counts page URLs on another host (usually www. against the apex) and other_host_name names the commonest one, so the customer can preview that name.

Request body

NameTypeRequiredWhat it is
fqdnstringYesThe host whose sitemap to read, e.g. example.com.
sitemap_urlstringNoA sitemap address on fqdn. Optional; without it the usual places are tried.

Response

NameTypeRequiredWhat it is
fqdnstringYes—
sitemap_urlobjectYesThe sitemap that answered; null when none could be read.
foundintegerYesPage paths on fqdn the sitemap lists (the home page is not one).
already_monitoredintegerYesHow many of those this organisation already monitors.
pathsstring[]YesThe paths not yet monitored, in sitemap order, no leading or trailing slash, capped at the per-organisation ceiling of 500.
roomintegerYesHow many more pages the plan allowance (and the row ceiling) lets this organisation add now.
other_hostintegerYesPage URLs in the sitemap on a different host, which are not offered.
other_host_namestringYesThe commonest such host, or empty.

Errors this endpoint can return

401 · 403 · 404 · 422