---
title: "Update Search Tool"
method: PATCH
path: "/v1/search-tools/{name}"
tags: ["search-tools"]
---

# Update Search Tool

`PATCH /v1/search-tools/{name}`

Update a stored search tool. Omitted fields are left as-is; an explicit ``null`` clears them.

``api_key`` follows the same rule: omit it to keep the stored key, send a new
one to rotate, or send ``null`` to clear it (a keyless SearXNG backend). The
row is locked ``FOR UPDATE`` so the ``expected_updated_at`` check and the
write it guards are atomic. The tool as it will be after the update is
validated, so a change that would leave it unusable (clearing the key of a
provider that needs one) is refused rather than stored.

## Path parameters

- `name` string, required

## Request body

- UpdateSearchToolRequest — Update a stored search tool. Omitted fields are unchanged; ``api_key`` rotates in place.
  - `api_base` string, nullable
  - `api_key` string, nullable — New API key. Omit to keep the existing one. Never returned.
  - `expected_updated_at` string, nullable — Optimistic concurrency: if set, the update 412s unless it matches the stored updated_at.
  - `options` object, nullable
  - `provider` string, nullable
  - `timeout` number, nullable

## Response `200`

Successful Response

- StoredSearchToolSchema — A runtime-stored search tool. The API key is never returned, only ``last4``.
  - `api_base` string, nullable
  - `created_at` string, nullable
  - `decryptable` boolean
  - `last4` string, nullable
  - `name` string, required
  - `options` object
  - `provider` string, required
  - `shadows_config` boolean — True when a config-file search tool of the same name exists; the stored one is in effect.
  - `timeout` number, nullable
  - `updated_at` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mozilla-ai/apis/otari.md) · [All operations](https://skmtc.net/mozilla-ai/apis/otari/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mozilla-ai/otari/revisions/6133543facaf/schema)
