Skip to main content
POST
Create a moderation policy

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Body

application/json
config
object
required
Example:
name
string
required

Policy name

Required string length: 1 - 255
Example:

"Engineering monthly budget"

policy_type
enum<string>
required
Available options:
moderation
workspace_id
string<uuid>
required

Workspace the policy belongs to

Example:

"0df9e665-d932-5740-b2c7-b52af166bc11"

api_key_hashes
string[]

API key hashes

Required string length: 1 - 255
Example:
is_workspace_default
boolean

Make this the workspace default for its policy type. Defaults to false.

member_ids
string[]

Organization member user IDs

Required string length: 1 - 255
Example:
opted_out_api_key_hashes
string[]

API keys that should not inherit the policy when it is the workspace default

Required string length: 1 - 255
Example:
opted_out_member_ids
string[]

Members that should not inherit the policy when it is the workspace default

Required string length: 1 - 255
Example:

Response

moderation policy created

data
object
required