iAdvizeDocs

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.

POST
/api/v1/sites/{siteId}/pages/exclusions

Authorization

ApiKeyAuth
AuthorizationBearer <token>

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

siteId*string

The site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/v1/sites/string/pages/exclusions" \  -H "Content-Type: application/json" \  -d '{    "rules": [      "blogs/*"    ]  }'
{  "data": {    "added": [      {        "id": "spgx_01kvnwmagvf27rc9cze5rm9e1r",        "rule": "blogs/*",        "pagesRemoved": 60      }    ],    "alreadyExcluded": [],    "pagesRemoved": 60  }}