Skip to main content
POST
Import policy

Authorizations

Authorization
string
header
required

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

Path Parameters

policy_id
string
required
Pattern: ^[a-z0-9-]{1,40}$

Query Parameters

expected_version
integer

Fail with 409 when the stored version differs. Can also be sent in the body.

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

Success

ok
boolean
errors
string[]
warnings
string[]
policy
object | null
migrated
boolean
diff
object[]