Replace crawler rules
Replaces the allow and block rules per crawler. Needs the admin role.
Related: Bot traffic report and Get crawler rules in Bot traffic.
Request
Path parameters
websitestringrequiredWebsite id or domain, e.g. example.com
1–253 characters
Headers
AuthorizationstringrequiredBearer followed by an account token or an OAuth access token with the settings:write scope.
Content-TypestringrequiredSend the body as JSON.
One of: application/json
Body fields
rulesobject[]requiredUp to 200 items
rules[].tokenstringrequired1–80 characters · Pattern: ^[A-Za-z0-9._-]+$
rules[].rulestringrequiredOne of: allow, block
Response
Rules.
{
"status": "string",
"data": {
"rules": [
{
"token": "string",
"rule": "allow"
}
],
"robotsTxt": "string"
}
}Response fields
| Field | Type | Description |
|---|---|---|
| status | "ok" | |
| data | object | |
| data.rules | object[] | |
| data.rules[].token | string | |
| data.rules[].rule | string | |
| data.robotsTxt | string |