Delete an exclusion
Removes a rule or an excluded address. Discovery may find its pages again from the next sitemap import or traffic run; nothing is restored at once. Recorded in the audit log, attributed to the API key. Returns the id and a deleted flag.
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.
The exclusion id (prefixed spgx_).
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X DELETE "https://example.com/api/v1/sites/string/pages/exclusions/string"{ "data": { "id": "spgx_01kvnwmagvf27rc9cze5rm9e1r", "deleted": true }}Add exclusion rules
Adds path rules, at most 50 per site. Each rule removes at once every page of source `sitemap` or `tag` whose path it matches (their starter questions stay) and keeps later imports and traffic from adding such pages again. Pages added by hand are never removed. A rule the site already holds is reported in `alreadyExcluded`. A malformed rule refuses the whole request with `invalid_exclusion_rule`, and going past 50 rules with `exclusion_rule_limit_reached`; nothing is changed then. Recorded in the audit log with counts only, attributed to the API key.
List a site's starter questions
Returns the site's library in its own order, each question with the state and the 14-day performance the dashboard shows. The totals by state and by source count the whole library whatever the filters. To see what a shopper is offered on a page, send `appliesToPath` and `appliesToLanguage` (and `appliesToPageType` when the page declares one). The list then holds the switched-on questions that match the page's targeting and have text in that language, in display order, at most three as on the storefront. A page that declares no type is offered the questions that target page types, as on the storefront. Filters combine with AND. `limit` is 1 to 100 (50 by default), and a cursor is bound to the filters it was issued for.