---
title: "Changes to Update an AI Gateway Custom Policy"
method: PUT
path: "/v1/ai-gateways/{gatewayId}/custom-policies/{customPolicyIdOrName}"
---

# Changes to Update an AI Gateway Custom Policy

`PUT /v1/ai-gateways/{gatewayId}/custom-policies/{customPolicyIdOrName}`

> Every recorded change to this operation, newest first.

## Timeline

Changed in 3 of 73 revisions.

- **2026-11-20** `757a21fb79f2`: 5 breaking, 2 warning, 4 info
- **2026-10-23** `30af8b28f6ef`: 1 breaking, 2 warning
- **2026-09-30** `f530bf400198`: 1 info

## Changes

- **2026-11-20** `757a21fb79f2`: 5 breaking, 2 warning, 4 info
  - the `oneOf[#/components/schemas/UpdateAIGatewayCustomPolicyInstalledRequest]/schema` request property's minLength was increased from `0` to `1`
  - the `oneOf[#/components/schemas/UpdateAIGatewayCustomPolicyStreamingRequest]/handler` request property's minLength was increased from `0` to `1`
  - the `oneOf[#/components/schemas/UpdateAIGatewayCustomPolicyStreamingRequest]/schema` request property's minLength was increased from `0` to `1`
  - the `oneOf[#/components/schemas/AIGatewayCustomPolicyInstalled]/managed_by/additionalProperties/` response property's maxLength was increased from `63` to `127` for the response status `200`
  - the `oneOf[#/components/schemas/AIGatewayCustomPolicyStreaming]/managed_by/additionalProperties/` response property's maxLength was increased from `63` to `127` for the response status `200`
  - changed the pattern of the request property `oneOf[#/components/schemas/UpdateAIGatewayCustomPolicyInstalledRequest]/managed_by/additionalProperties/` from `^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$` to `^[^\s\x00-\x1F\x7F-\x9F]+$`
  - changed the pattern of the request property `oneOf[#/components/schemas/UpdateAIGatewayCustomPolicyStreamingRequest]/managed_by/additionalProperties/` from `^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$` to `^[^\s\x00-\x1F\x7F-\x9F]+$`
  - the `oneOf[#/components/schemas/UpdateAIGatewayCustomPolicyInstalledRequest]/managed_by/additionalProperties/` request property's maxLength was increased from `63` to `127`
  - the `oneOf[#/components/schemas/UpdateAIGatewayCustomPolicyStreamingRequest]/managed_by/additionalProperties/` request property's maxLength was increased from `63` to `127`
  - the `oneOf[#/components/schemas/AIGatewayCustomPolicyInstalled]/managed_by/additionalProperties/` response's property pattern was changed from `^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$` to `^[^\s\x00-\x1F\x7F-\x9F]+$` for the status `200`
  - the `oneOf[#/components/schemas/AIGatewayCustomPolicyStreaming]/managed_by/additionalProperties/` response's property pattern was changed from `^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$` to `^[^\s\x00-\x1F\x7F-\x9F]+$` for the status `200`
- **2026-10-23** `30af8b28f6ef`: 1 breaking, 2 warning
  - added `#/components/schemas/InvalidParameterMinimumTime, #/components/schemas/InvalidParameterMaximumTime` to the `invalid_parameters/items/` response property `oneOf` list for the response status `400`
  - added the new `key_invalid` enum value to the `invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
  - added the new `unique` enum value to the `invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
- **2026-09-30** `f530bf400198`: 1 info
  - endpoint added

---

[Operation](https://skmtc.dev/kong/apis/konnect-api/docs/v1/ai-gateways/:gatewayId/custom-policies/:customPolicyIdOrName/put.md) - [API](https://skmtc.dev/kong/apis/konnect-api.md) - [Page](https://skmtc.dev/kong/apis/konnect-api/changes/v1/ai-gateways/:gatewayId/custom-policies/:customPolicyIdOrName/put)
