---
title: "Update Api Key"
method: PUT
path: "/api/ui/api-key"
tags: ["Web UI"]
---

# Update Api Key

`PUT /api/ui/api-key`

## Request

- The document declares no server URL.
- Auth: none declared

Update the Moorcheh API key from the Web UI.
Expects: {"api_key": "new-key-value", "current_key": "existing-key"}

When a key is already configured, the caller must supply the correct
current_key to authorize the replacement.  This prevents a loopback
attacker (e.g. via DNS rebinding) from silently swapping credentials.

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/moorcheh-ai/apis/memanto-memory-that-ai-agents-love.md) - [All operations](https://skmtc.dev/moorcheh-ai/apis/memanto-memory-that-ai-agents-love/llms.txt) - [OpenAPI document](https://skmtc.dev/moorcheh-ai/apis/memanto-memory-that-ai-agents-love/revisions/ef842776283e?raw)
