---
title: "Delete an AI Gateway Custom Policy"
method: DELETE
path: "/v1/ai-gateways/{gatewayId}/custom-policies/{customPolicyIdOrName}"
tags: ["AI Gateway Custom Policies"]
---

# Delete an AI Gateway Custom Policy

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

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v1/ai-gateways/{gatewayId}/custom-policies/{customPolicyIdOrName}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Removes a specific AI Gateway custom policy.

## Path parameters

- `gatewayId` string, uuid, required: Contains a unique identifier used for this resource.
- `customPolicyIdOrName` string, required: Identifier for an AI Gateway entity. In some cases, this may be the entity name or ID.

## Response `204`

Custom policy deleted successfully.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests

## Changes

- **2026-10-15** `7aab863a6daa`: 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** `de79e1192f11`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-go-sdk/changes/v1/ai-gateways/:gatewayId/custom-policies/:customPolicyIdOrName/delete.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)
