Clear decision rules
Clears this scope's rules and instructions only when ifVersion matches, and returns the next version.
DELETE
Clears this scope's rules and instructions only when ifVersion matches, and returns the next version. The stored version is retained. Other scopes and subject defaults continue to apply.
apiKeyheader
x-api-key<token>kind*stringValue in
"organization""mailbox""apiKey""agent"id*stringLength
1 <= lengthifVersion*integerRange
0 <= value <= 9007199254740991PolicySnapshot
application/json- response
presets*array<>rules*array<|>instructions?string|nullversion*PolicyVersionRange
0 <= value <= 9007199254740991import { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.policies.deletePolicy({
"kind": "organization",
"id": "example",
"ifVersion": 0
});Example Response
{
"presets": [
"string"
],
"rules": [
{
"match": {
"kind": "send",
"effect": "read",
"channel": "sms",
"integration": "string",
"tool": "string",
"subject": "agent"
},
"note": "string",
"decide": "run",
"atLeast": null
}
],
"instructions": "string",
"version": 0
}