hosting
POST /v1/index-monitoring/sitemap-preview
Count the pages a site's sitemap would add to index monitoring, before adding any.
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
| Name | Type | Required | What it is |
|---|---|---|---|
fqdn | string | Yes | The host whose sitemap to read, e.g. example.com. |
sitemap_url | string | No | A sitemap address on fqdn. Optional; without it the usual places are tried. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
fqdn | string | Yes | — |
sitemap_url | object | Yes | The sitemap that answered; null when none could be read. |
found | integer | Yes | Page paths on fqdn the sitemap lists (the home page is not one). |
already_monitored | integer | Yes | How many of those this organisation already monitors. |
paths | string[] | Yes | The paths not yet monitored, in sitemap order, no leading or trailing slash, capped at the per-organisation ceiling of 500. |
room | integer | Yes | How many more pages the plan allowance (and the row ceiling) lets this organisation add now. |
other_host | integer | Yes | Page URLs in the sitemap on a different host, which are not offered. |
other_host_name | string | Yes | The commonest such host, or empty. |
Errors this endpoint can return
401 · 403 · 404 · 422