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

# Creates MeshRateLimit entity

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

## Request

- Base URL: `https://global.api.konghq.com`
- URL: `https://global.api.konghq.com/v3/mesh/control-planes/{cpId}/meshes/{mesh}/meshratelimits`
- 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

- MeshRateLimitItem: MeshRateLimit protects services from being overwhelmed by limiting the rate of incoming requests or connections. It supports local rate limiting for both HTTP (requests per interval) and TCP (connections per interval) traffic with customizable response codes and headers for rate-limited requests.
  - `type` 'MeshRateLimit', 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 MeshRateLimit resource.
    - `rules` object[]: Rules defines inbound rate limiting configurations.
      - `default` object: Default contains configuration of the inbound rate limits
        - `local` object: LocalConf defines local http or/and tcp rate limit configuration
          - `http` object: LocalHTTP defines configuration of local HTTP rate limiting https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/local_rate_limit_filter
            - `disabled` boolean: Define if rate limiting should be disabled.
            - `onRateLimit` object: Describes the actions to take on a rate limit event
              - …
            - `requestRate` object: Defines how many requests are allowed per interval.
              - …
          - `tcp` object: LocalTCP defines confguration of local TCP rate limiting https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/network_filters/local_rate_limit_filter
            - `connectionRate` object: Defines how many connections are allowed per interval.
              - …
            - `disabled` boolean: Define if rate limiting should be disabled. Default: false
      - `matches` object[]: Matches define additional conditions for applying this rate limit rule.
        - `sni` object: SNI defines a matcher configuration for matching by SNI value carried on the TLS connection
          - `type` 'Exact', required: Type defines how to match traffic by SNI. Only `Exact` is supported.
          - `value` string, required: Value is the SNI carried on the TLS connection that needs to match for the configuration to be applied
        - `spiffeID` object: SpiffeID defines a matcher configuration for SpiffeID matching
          - `type` 'Exact' | 'Prefix', required: Type defines how to match incoming traffic by SpiffeID. `Exact` or `Prefix` are allowed.
          - `value` string, required: Value is SpiffeID of a client that needs to match for the configuration to be applied
    - `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.
    - `to` object[]: To list makes a match between clients and corresponding configurations
      - `default` object: Default is a configuration specific to the group of clients referenced in 'targetRef'
        - `local` object: LocalConf defines local http or/and tcp rate limit configuration
          - `http` object: LocalHTTP defines configuration of local HTTP rate limiting https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/local_rate_limit_filter
            - `disabled` boolean: Define if rate limiting should be disabled.
            - `onRateLimit` object: Describes the actions to take on a rate limit event
              - …
            - `requestRate` object: Defines how many requests are allowed per interval.
              - …
          - `tcp` object: LocalTCP defines confguration of local TCP rate limiting https://www.envoyproxy.io/docs/envoy/latest/configuration/listeners/network_filters/local_rate_limit_filter
            - `connectionRate` object: Defines how many connections are allowed per interval.
              - …
            - `disabled` boolean: Define if rate limiting should be disabled. Default: false
      - `targetRef` object, required: TargetRef is a reference to the resource that represents a group of clients.
        - `kind` 'Mesh' | 'MeshService' | 'MeshExternalService' | 'MeshMultiZoneService' | 'MeshHTTPRoute', 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/meshratelimits/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)
