Change a source rule
Change the mode, kind or value of one rule; the id stays. A change that would duplicate another rule is refused as 409 duplicate_source_rule.
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
Path Parameters
id*string
The rule id (sr_…) from the list.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/source-rules/string" \ -H "Content-Type: application/json" \ -d '{ "mode": "exclude", "kind": "domain", "value": "example.com" }'{ "rule": { "id": "sr_k3j9x2m8q1w5", "mode": "exclude", "kind": "domain", "value": "example.com" }}