# Update a preset's name or clauses (/docs/reference/management/updatePreset)

> For AI agents, the [documentation index](https://bitrouter-docs-staging.up.railway.app/llms.txt) lists all pages. Append .md to a documentation URL to read its Markdown.

`PUT /v1/namespaces/{nsid}/presets/{id}`

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.*

## Authentication

header parameter `x-api-key` or `Authorization: Bearer <token>`.

Base URL: `https://api.bitrouter.ai`

## Parameters

* `nsid` (path, required): Id of the target namespace. Must be owned by the caller (or equal a namespace-baked credential's own namespace), else 404.
* `id` (path, required): Surrogate id of the `policies` row.

## Request body

Preset patch.

Media types: `application/json`.

* `budget`
* `clear_budget`: boolean
* `clear_guardrail`: boolean
* `clear_rate_limit`: boolean
* `guardrail`
* `name`: string | null
* `rate_limit`

## Responses

* `200` Updated preset. (application/json)
* `401` Credential missing or did not verify. (application/json)
* `403` Credential is valid but lacks the required scope. (application/json)
* `404` Resource not found (or owned by a different account). (application/json)

[Full OpenAPI schema](https://bitrouter-docs-staging.up.railway.app/openapi.json)