---
title: "Replace AI Settings by Portal"
method: PUT
path: "/v3/portals/{portalId}/ai-settings"
tags: ["AI Settings"]
---

# Replace AI Settings by Portal

`PUT /v3/portals/{portalId}/ai-settings`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v3/portals/{portalId}/ai-settings`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Replaces AI settings for a given portal including the configuration of all AI features.

## Path parameters

- `portalId` string, uuid, required

## Request body

- ReplaceAISettingsRequest
  - `enabled` boolean, required: Whether AI is enabled or not
  - `features` ReplaceAISettingsRequestFeatures, required: AI Features configuration. When top-level `enabled` is false, every feature toggle here must be automatically reset to false.
    - `ai_search` object, required: AI Search configuration
      - `enabled` boolean, required: Whether AI Search is enabled or not
    - `mcp_server` object, required: MCP Server configuration
      - `enabled` boolean, required: Whether the Portal MCP Server is enabled or not
      - `write_operations_enabled` boolean, required: Whether write operations are enabled or not for the Portal MCP Server enabled

## Response `200`

AI settings for a given portal.

- AISettingsResponseBody
  - `enabled` boolean, required: Is AI enabled?
  - `features` AISettingsResponseFeatures, required: AI features configuration. When top-level `enabled` is false, every feature toggle here is automatically reset to false.
    - `ai_search` object, required: AI Search configuration
      - `enabled` boolean, required: Whether AI Search is enabled or not
    - `mcp_server` object, required: MCP Server configuration
      - `enabled` boolean, required: Whether the Portal MCP Server is enabled or not
      - `write_operations_enabled` boolean, required: Whether write operations are enabled or not for the Portal MCP Server enabled

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found

## Changes

- **2026-11-16** `a209c8bfa7b7`: 1 breaking, 1 info
  - added the new required request property `features/ai_search`
  - added the required property `features/ai_search` to the response with the `200` status
- **2026-11-12** `d8bd04cfbaf7`: 1 breaking, 3 warning
  - removed the required property `features/ai_search` from the response with the `200` status
  - removed the request property `features/ai_search`
  - removed the request property `features/portal_agent`
  - removed the optional property `features/portal_agent` from the response with the `200` status
- **2026-11-05** `ff8439091e5f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v3/portals/:portalId/ai-settings/put.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-go-sdk.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-go-sdk/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-go-sdk/revisions/3b071797f6e4?raw)
