---
title: "Set Instance Auth"
method: POST
path: "/mcp-server/instance/set-auth"
tags: ["mcp-server"]
---

# Set Instance Auth

`POST /mcp-server/instance/set-auth`

Sets authentication data for a specific integration instance.
Accepts either API key authentication or general authentication data.
This updates the auth_metadata for the specified integration instance.

## Request body

- SetAuthRequest
  - `instanceId` string, required — The unique identifier for the connection instance
  - `authData` union, required — Authentication data
    - ApiKeyAuth
      - `token` string, nullable — The API key to save (token field)
      - `api_key` string, nullable — The API key to save (api_key field)
    - GeneralAuth
      - `data` object — Any other general authentication data to save

## Response `200`

Successful Response

- StatusResponse
  - `success` boolean, required
  - `message` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/weatherpal-ai/apis/mcp-handle-https-www-mcp-handle-dev.md) · [All operations](https://skmtc.net/weatherpal-ai/apis/mcp-handle-https-www-mcp-handle-dev/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/weatherpal-ai/mcp-handle-https-www-mcp-handle-dev/versions/58fc8af3b578/schema)
