---
title: "Update Mcp Api Key"
method: POST
path: "/api/py/mcp/update-key"
---

# Update Mcp Api Key

`POST /api/py/mcp/update-key`

## Request

- Base URL: `https://api.getauctor.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getauctor.com/api/py/mcp/update-key`
- Auth: none declared

Rotate the API key for an existing api_key connection and re-validate.

Also accepts an optional ``header_name`` so users can switch a connection
between the default ``Authorization: Bearer`` flow and a custom header
(or vice versa) at the same time as rotating the key — no need to
disconnect + re-add.

## Request body

- UpdateKeyRequest
  - `connection_id` string, required
  - `api_key` string, nullable
  - `header_name` string, nullable
  - `headers` HeaderEntry[], nullable
    - `name` string, required
    - `value` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-01** `aeb6faa3b8f0`: 4 info
  - added the new optional request property `header_name`
  - added the new optional request property `headers`
  - the request property `api_key` became optional
  - request property `api_key` list-of-types was widened by adding types `null` to media type `application/json`

[Operation history](https://skmtc.dev/getauctor/apis/getauctor-api/changes/api/py/mcp/update-key/post.md)

---

[API](https://skmtc.dev/getauctor/apis/getauctor-api.md) - [All operations](https://skmtc.dev/getauctor/apis/getauctor-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getauctor/apis/getauctor-api/revisions/be39c59c13f6?raw)
