---
title: "Create or update a custom plugin schema"
method: PUT
path: "/v2/control-planes/{controlPlaneId}/core-entities/plugin-schemas/{name}"
tags: ["Custom Plugin Schemas"]
---

# Create or update a custom plugin schema

`PUT /v2/control-planes/{controlPlaneId}/core-entities/plugin-schemas/{name}`

Create or update an individual custom plugin schema.

## Request body

- object
  - `lua_schema` string, required — The custom plugin schema; `jq -Rs '.' schema.lua`.

## Response `200`

A response for a single custom plugin schema.

- object
  - `item` object, nullable
    - `lua_schema` string, nullable — The custom plugin schema; `jq -Rs '.' schema.lua`.
    - `name` string, nullable — The custom plugin name determined by the custom plugin schema.
    - `created_at` integer — An ISO-8604 timestamp representation of custom plugin schema creation date.
    - `updated_at` integer — An ISO-8604 timestamp representation of custom plugin schema update date.

## Other responses

- `400` — Forbidden
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Forbidden

## Changes

- **2025-08-22** `96118a9cd7f4` — 3 breaking
  - the response property `item` became nullable for the status `200`
  - the response property `item/lua_schema` became nullable for the status `200`
  - the response property `item/name` became nullable for the status `200`
- **2025-06-27** `9f695af25102` — 1 info
  - added the non-success response with the status `400`
- **2025-06-19** `60ce7598bbd0` — 4 breaking, 19 warning, 9 info
  - the response's body type changed from `object` to no type for status `401`
  - media type `application/problem+json` was changed to a more general media type `application/json` for the response status `401`
  - media type `application/problem+json` was changed to a more general media type `application/json` for the response status `403`
  - media type `application/problem+json` was changed to a more general media type `application/json` for the response status `404`
  - …28 more

[Change history](https://skmtc.dev/kong/apis/konnect-api/changes/v2/control-planes/:controlPlaneId/core-entities/plugin-schemas/:name/put.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api.md) · [All operations](https://skmtc.dev/kong/apis/konnect-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kong/konnect-api/revisions/72502a676a92/schema)
