Replace all 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 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 }}Add a source rule POST
Add one rule. A rule that already exists (same mode, kind and value) is answered as 200 with the existing rule rather than duplicated; a new rule is 201. Past the limit the answer is 422 `rule_limit_reached`. 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.
Get a source rule GET
Next Page