Replace all source rules

PUT
/v1/source-rules

Replace the whole list in one call (rules: [] clears it). Rules sent with their ids keep them; rules without ids get new ones. A source rule names web sources a plagiarism check may or may not cite. mode is exclude (drop matching sources) or include (once any include rule exists, ONLY sources matching one are kept; excludes still apply on top, so exclude wins when both match). kind is domain (the root and every subdomain: example.com), hostname (one exact host: blog.example.com), url (everything beginning with the address: example.com/essays) or pattern (robots.txt-style: * matches any run of characters and a trailing $ anchors the end: *.example.com/essays/*). Values are stored lowercased without scheme or www.; a value that could match nothing (a path in a domain rule, a pattern shorter than three literal characters) is refused as invalid_source_rule. The list is the account's: the same rules the app's Settings page edits, applied to every check the account runs. A single check may add its own with sourceRules on POST /v1/checks.

Authorization

bearerAuth
AuthorizationBearer <token>

Create a key under Account → API. Send it as Authorization: Bearer st_live_…. Keys carry scopes: checks:write (create, cancel, delete; add, change and delete source rules), checks:read (list, get; list source rules) and usage:read (credit position).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://example.com/v1/source-rules" \  -H "Content-Type: application/json" \  -d '{    "rules": [      {        "mode": "exclude",        "kind": "domain",        "value": "example.com"      }    ]  }'
{  "rules": [    {      "id": "sr_k3j9x2m8q1w5",      "mode": "exclude",      "kind": "domain",      "value": "example.com"    }  ],  "count": 0,  "limits": {    "maxRules": 0,    "maxValueLength": 0  }}