Groundeddocs
ReferenceAdmin

Replace an audience's moderation policy (platform admins; audited)

PUT/v1/admin/moderation/policies/{audience}

400 invalid_policy (details.problems lists {field, problem}) for bad values, a public policy that does not fail closed, or rules without a provider; 400 invalid_model when modelId is not a moderation or SystemOne model.

Path Parameters

audience*string

Value in

  • "team"
  • "all_authenticated"
  • "public"

Header Parameters

If-Match*string

The resource's revision, as returned in ETag (for example "3"). Missing returns 428; stale returns 412.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/admin/moderation/policies/team" \  -H "If-Match: string" \  -H "Content-Type: application/json" \  -d '{    "modelId": "17563eeb-82d7-4210-ac9b-1a20c7d67278",    "categories": {      "property1": {        "input": {          "action": "off",          "threshold": 0        },        "output": {          "action": "off",          "threshold": 0        }      },      "property2": {        "input": {          "action": "off",          "threshold": 0        },        "output": {          "action": "off",          "threshold": 0        }      }    },    "outputMode": "stream_retract",    "failClosed": true  }'
{  "data": {    "audience": "team",    "modelId": "17563eeb-82d7-4210-ac9b-1a20c7d67278",    "categories": {      "property1": {        "input": {          "action": "off",          "threshold": 0        },        "output": {          "action": "off",          "threshold": 0        }      },      "property2": {        "input": {          "action": "off",          "threshold": 0        },        "output": {          "action": "off",          "threshold": 0        }      }    },    "outputMode": "stream_retract",    "failClosed": true,    "notice": "string",    "severityBlock": 0,    "supportMessage": "string",    "uncalibratedBlockThreshold": 0,    "revision": 0,    "updatedAt": "2019-08-24T14:15:22Z"  }}