List a site's sitemap imports
Returns the sitemap imports of the site, newest first, each with its state, outcome, what started it, its timestamps and its counts. `limit` is 1 to 50 (20 by default).
Authorization
ApiKeyAuth A WorkOS org-scoped API key, created from the dashboard's organization settings page. Identifies the tenant every read and write is scoped to. Missing, malformed, unknown, revoked, expired, or non-organization-owned keys all return 401 (no distinction, so the response can't be used to probe which keys or org ids exist).
In: header
Path Parameters
The site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.
Query Parameters
How many imports, 1 to 50.
1 <= value <= 5020Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/api/v1/sites/string/pages/imports"{ "data": [ { "id": "spgi_01kvnwmagvf27rc9cze5rm9e1r", "state": "completed", "outcome": "completed", "startedBy": "api", "sitemapGiven": false, "counts": { "sitemapSource": "robots", "documentsRead": 5, "documentsFailed": { "address_not_allowed": 0, "not_on_site": 0, "redirected_off_site": 0, "too_many_redirects": 0, "not_found": 0, "http_error": 0, "timed_out": 1, "unreachable": 0, "not_a_sitemap": 0, "unreadable": 0 }, "found": 1240, "created": 1180, "alreadyHeld": 52, "excluded": 6, "refused": { "not_a_valid_address": 0, "contains_wildcard": 0, "not_on_site": 2, "too_long": 0, "not_a_page": 0 }, "overCap": 0, "createdByType": [ { "key": "product", "count": 940 }, { "key": "category", "count": 180 }, { "key": "blog", "count": 60 } ], "createdByTypeRest": 0, "createdByLanguageHint": [ { "key": null, "count": 700 }, { "key": "fr", "count": 480 } ], "createdByLanguageHintRest": 0 }, "boundsReached": [], "startedAt": "2026-10-03T08:00:00.000Z", "endedAt": "2026-10-03T08:03:10.000Z" } ]}Import pages from the sitemap
Starts a sitemap import for the site and answers at once with the import. The import runs in the background: it finds the sitemap (the given address, else robots.txt, then the usual places), reads it within size bounds and adds the pages it lists as `discovered`, within the site's page limit and its exclusions. Discovered pages are read only on request or by automatic reading. Follow the import at `GET .../pages/imports/{importId}`. A sitemap address that is not on the site is refused with `sitemap_not_on_site` and no request is made to it; a second import while one runs is refused with `discovery_already_running`. The answer is `202` when the import was handed to the background, and `200` with the import closed as `failed` when it could not be started. Recorded in the audit log, attributed to the API key.
Get a sitemap import
Returns one import with its state, outcome and counts. While it runs, the counts are those so far. An import with no progress for 30 minutes reads `failed`. An import of another site answers `404`.