Skip to main content
POST
Create policy

Authorizations

Authorization
string
header
required

Enter your API key (starts with 'ek-')

Body

application/json
policyId
string
Pattern: ^[a-z0-9-]{1,40}$
name
string
schemaVersion
integer
Example:

4

mode
enum<string>

custom evaluates custom.rules first.

Available options:
auto,
custom
auto
object
custom
object
models
object
guardrails
object
cache
object

Response cache for repeated requests.

Response

Created

policy
object
version
integer
updatedAt
string<date-time> | null
updatedBy
string
warnings
string[]