---
title: "Creates MeshProxyPatch entity"
method: POST
path: "/v3/mesh/control-planes/{cpId}/meshes/{mesh}/meshproxypatches"
tags: ["MeshProxyPatch"]
---

# Creates MeshProxyPatch entity

`POST /v3/mesh/control-planes/{cpId}/meshes/{mesh}/meshproxypatches`

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v3/mesh/control-planes/{cpId}/meshes/{mesh}/meshproxypatches`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Creates a resource using the name in the body. An existing resource is never modified. Requires Kuma 3.0 or later.

## Path parameters

- `cpId` string, uuid, required
- `mesh` string, required

## Request body

- MeshProxyPatchItem: MeshProxyPatch provides advanced customization of the Envoy proxy configuration generated by Kuma. It allows you to add, remove, or modify Envoy resources (clusters, listeners, filters, virtual hosts) using YAML patches or JSON patches for fine-grained control beyond standard policies.
  - `type` 'MeshProxyPatch', required: the type of the resource
  - `mesh` string: Mesh is the name of the Kuma mesh this resource belongs to. It may be omitted for cluster-scoped resources.
  - `kri` string: A unique identifier for this resource instance used by internal tooling and integrations. Typically derived from resource attributes and may be used for cross-references or indexing
  - `name` string, required: Name of the Kuma resource
  - `labels` object: The labels to help identity resources
  - `spec` object, required: Spec is the specification of the Kuma MeshProxyPatch resource.
    - `default` object, required: Default is a configuration specific to the group of destinations referenced in 'targetRef'.
      - `appendModifications` object[]: AppendModifications is a list of modifications applied on the selected proxy.
        - `cluster` object: Cluster is a modification of Envoy's Cluster resource.
          - `jsonPatches` object[]: JsonPatches specifies list of jsonpatches to apply to on Envoy's Cluster resource
            - `from` string: From is a jsonpatch from string, used by move and copy operations.
            - `op` 'add' | 'remove' | 'replace' | 'move' | 'copy', required: Op is a jsonpatch operation string.
            - `path` string, required: Path is a jsonpatch path string.
            - `value` unknown
          - `match` object: Match is a set of conditions that have to be matched for modification operation to happen.
            - `name` string: Name of the cluster to match.
            - `origin` string: Origin is the name of the component or plugin that generated the resource. Here is the list of well-known origins: inbound - resources generated for handling incoming traffic. outbound - resources generated for handling outgoing traffic. transparent - resources generated for transparent proxy functionality. prometheus - resources generated when Prometheus metrics are enabled. direct-access - resources generated for Direct Access functionality. ingress - resources generated for Zone Ingress. egress - resources generated for Zone Egress. The list is not complete, because policy plugins can introduce new resources. For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
          - `operation` 'Add' | 'Remove' | 'Patch', required: Operation to execute on matched cluster.
          - `value` string: Value of xDS resource in YAML format to add or patch. Patch merges the value into the matched cluster, and repeated fields are appended to what the cluster already has. Circuit breaker thresholds are the exception: Envoy resolves them by routing priority and ignores every threshold after the first one of a given priority, so appending would be dead config. They are merged into the existing threshold with the same priority instead, and a value listing one priority twice keeps only the first entry.
        - `httpFilter` object: HTTPFilter is a modification of Envoy HTTP Filter available in HTTP Connection Manager in a Listener resource.
          - `jsonPatches` object[]: JsonPatches specifies list of jsonpatches to apply to on Envoy's HTTP Filter available in HTTP Connection Manager in a Listener resource.
            - `from` string: From is a jsonpatch from string, used by move and copy operations.
            - `op` 'add' | 'remove' | 'replace' | 'move' | 'copy', required: Op is a jsonpatch operation string.
            - `path` string, required: Path is a jsonpatch path string.
            - `value` unknown
          - `match` object: Match is a set of conditions that have to be matched for modification operation to happen.
            - `listenerName` string: Name of the listener to match.
            - `listenerTags` object: Listener tags available in Listener#Metadata#FilterMetadata[io.kuma.tags]
            - `name` string: Name of the HTTP filter. For example "envoy.filters.http.local_ratelimit"
            - `origin` string: Origin is the name of the component or plugin that generated the resource. Here is the list of well-known origins: inbound - resources generated for handling incoming traffic. outbound - resources generated for handling outgoing traffic. transparent - resources generated for transparent proxy functionality. prometheus - resources generated when Prometheus metrics are enabled. direct-access - resources generated for Direct Access functionality. ingress - resources generated for Zone Ingress. egress - resources generated for Zone Egress. The list is not complete, because policy plugins can introduce new resources. For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
          - `operation` 'Remove' | 'Patch' | 'AddFirst' | 'AddBefore' | 'AddAfter' | 'AddLast', required: Operation to execute on matched listener.
          - `value` string: Value of xDS resource in YAML format to add or patch.
        - `listener` object: Listener is a modification of Envoy's Listener resource.
          - `jsonPatches` object[]: JsonPatches specifies list of jsonpatches to apply to on Envoy's Listener resource
            - `from` string: From is a jsonpatch from string, used by move and copy operations.
            - `op` 'add' | 'remove' | 'replace' | 'move' | 'copy', required: Op is a jsonpatch operation string.
            - `path` string, required: Path is a jsonpatch path string.
            - `value` unknown
          - `match` object: Match is a set of conditions that have to be matched for modification operation to happen.
            - `name` string: Name of the listener to match.
            - `origin` string: Origin is the name of the component or plugin that generated the resource. Here is the list of well-known origins: inbound - resources generated for handling incoming traffic. outbound - resources generated for handling outgoing traffic. transparent - resources generated for transparent proxy functionality. prometheus - resources generated when Prometheus metrics are enabled. direct-access - resources generated for Direct Access functionality. ingress - resources generated for Zone Ingress. egress - resources generated for Zone Egress. The list is not complete, because policy plugins can introduce new resources. For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
            - `tags` object: Tags available in Listener#Metadata#FilterMetadata[io.kuma.tags]
          - `operation` 'Add' | 'Remove' | 'Patch', required: Operation to execute on matched listener.
          - `value` string: Value of xDS resource in YAML format to add or patch.
        - `networkFilter` object: NetworkFilter is a modification of Envoy Listener's filter.
          - `jsonPatches` object[]: JsonPatches specifies list of jsonpatches to apply to on Envoy Listener's filter.
            - `from` string: From is a jsonpatch from string, used by move and copy operations.
            - `op` 'add' | 'remove' | 'replace' | 'move' | 'copy', required: Op is a jsonpatch operation string.
            - `path` string, required: Path is a jsonpatch path string.
            - `value` unknown
          - `match` object: Match is a set of conditions that have to be matched for modification operation to happen.
            - `listenerName` string: Name of the listener to match.
            - `listenerTags` object: Listener tags available in Listener#Metadata#FilterMetadata[io.kuma.tags]
            - `name` string: Name of the network filter. For example "envoy.filters.network.ratelimit"
            - `origin` string: Origin is the name of the component or plugin that generated the resource. Here is the list of well-known origins: inbound - resources generated for handling incoming traffic. outbound - resources generated for handling outgoing traffic. transparent - resources generated for transparent proxy functionality. prometheus - resources generated when Prometheus metrics are enabled. direct-access - resources generated for Direct Access functionality. ingress - resources generated for Zone Ingress. egress - resources generated for Zone Egress. The list is not complete, because policy plugins can introduce new resources. For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
          - `operation` 'Remove' | 'Patch' | 'AddFirst' | 'AddBefore' | 'AddAfter' | 'AddLast', required: Operation to execute on matched listener.
          - `value` string: Value of xDS resource in YAML format to add or patch.
        - `virtualHost` object: VirtualHost is a modification of Envoy's VirtualHost referenced in HTTP Connection Manager in a Listener resource.
          - `jsonPatches` object[]: JsonPatches specifies list of jsonpatches to apply to on Envoy's VirtualHost resource
            - `from` string: From is a jsonpatch from string, used by move and copy operations.
            - `op` 'add' | 'remove' | 'replace' | 'move' | 'copy', required: Op is a jsonpatch operation string.
            - `path` string, required: Path is a jsonpatch path string.
            - `value` unknown
          - `match` object, required: Match is a set of conditions that have to be matched for modification operation to happen.
            - `name` string: Name of the VirtualHost to match.
            - `origin` string: Origin is the name of the component or plugin that generated the resource. Here is the list of well-known origins: inbound - resources generated for handling incoming traffic. outbound - resources generated for handling outgoing traffic. transparent - resources generated for transparent proxy functionality. prometheus - resources generated when Prometheus metrics are enabled. direct-access - resources generated for Direct Access functionality. ingress - resources generated for Zone Ingress. egress - resources generated for Zone Egress. The list is not complete, because policy plugins can introduce new resources. For example MeshTrace plugin can create Cluster with "mesh-trace" origin.
            - `routeConfigurationName` string: Name of the RouteConfiguration resource to match.
          - `operation` 'Add' | 'Remove' | 'Patch', required: Operation to execute on matched listener.
          - `value` string: Value of xDS resource in YAML format to add or patch.
    - `targetRef` object: TargetRef is a reference to the resource the policy takes an effect on. The resource could be either a real store object or virtual resource defined inplace.
      - `kind` 'Mesh' | 'Dataplane', required: Kind of the referenced resource
      - `labels` object: Labels are used to select referenced real resources and to carry legacy service identity when a common TargetRef must still target old service-tag based paths.
      - `sectionName` string: SectionName is used to target specific section of resource. For example, you can target port from MeshService.ports[] by its name. Only traffic to this port will be affected.
  - `creationTime` string, date-time: Time at which the resource was created
  - `modificationTime` string, date-time: Time at which the resource was updated

## Response `201`

Successful response

- object
  - `warnings` string[]: warnings is a list of warning messages to return to the requesting Kuma API clients. Warning messages describe a problem the client making the API request should correct or be aware of.

## Other responses

- `400`: Invalid resource
- `404`: Parent mesh not found
- `409`: A resource with this identity already exists

## Changes

- **2026-12-03** `9c8d300657bd`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/konnect-api-beta/changes/v3/mesh/control-planes/:cpId/meshes/:mesh/meshproxypatches/post.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-beta.md) - [All operations](https://skmtc.dev/kong/apis/konnect-api-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/konnect-api-beta/revisions/9c8d300657bd?raw)
