Update a preset's name or clauses
Partial patch. Each clause replacement is optional; an absent clause is left unchanged. Use the explicit clear_guardrail / clear_budget / clear_rate_limit flags to remove a clause — null body fields are NOT interpreted as clears.
Requires the policy:write scope.
Anthropic-style API key header.
In: header
Path Parameters
Id of the target namespace. Must be owned by the caller (or equal a namespace-baked credential's own namespace), else 404.
Surrogate id of the policies row.
Request Body
application/json
Preset patch.
TypeScript Definitions
Use the request body type in TypeScript.
Partial update for a preset. Each clause is independently
optional: None means "leave this clause unchanged"; a
JSON null (deserialised as Some(None) via
#[serde(default, with = "serde_with::rust::double_option")]
— not used here, see the explicit clear_* flags) is not
supported. Use the explicit clear_* flags to remove a clause.
This shape was chosen over serde_with::double_option because
Option<Option<T>> is awkward for callers and the clear_*
flag is unambiguous on the wire.
Response Body
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/v1/namespaces/string/presets/string" \ -H "Content-Type: application/json" \ -d '{}'{ "budget": { "limit_micro_usd": 0, "window": "day" }, "disabled_at": "2019-08-24T14:15:22Z", "guardrail": { "allow_streaming": true, "byok": "required", "content_patterns": [ { "action": "block", "name": "string", "pattern": "string" } ], "max_request_tokens": 0, "model_allow": [ "string" ], "model_deny": [ "string" ] }, "id": "string", "name": "string", "rate_limit": { "max_requests": 0, "max_tokens": 0, "window_secs": 0 }}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}How is this guide?