Replace an environment's complete ordered policy list. An empty list removes every policy. The operation is atomic and accepts at most 50 policies.
Usage#
Flags#
Project ID or slug.
Application ID or slug.
Environment ID or slug.
The complete policy list in evaluation order. Each policy requires
name and enabled, and exactly one of keyauth, ratelimit, firewall, openapi, or logging.
Show JSON schemaHide JSON schema
Dashboard name.
Whether evaluation is enabled.
Optional path, method, header, or query parameter match expressions.
Keyspaces, locations, permission query, and rate limits.
Limit, windowMs, and identifiers.
Firewall action.
OpenAPI validation configuration.
Logging configuration.
Global Flags#
| Flag | Type | Description |
|---|---|---|
--root-key | string | Override root key ($UNKEY_ROOT_KEY) |
--api-url | string | Override API base URL (default: https://api.unkey.com) |
--config | string | Path to config file (default: ~/.unkey/config.toml) |
--output | string | Output format, use json for raw JSON |
--body | string | Send this JSON string as the request body. You cannot combine it with request-building flags. |
Examples#
See the API reference.