---
title: "Upload custom plugin schema"
url: "https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-3/versions/4a9ee72f-47ac-4061-9b08-3290c8d0ce93/operations/create-plugin-schemas"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-3/versions/4a9ee72f-47ac-4061-9b08-3290c8d0ce93.md

# Upload custom plugin schema

`POST` `/control-planes/{controlPlaneId}/core-entities/plugin-schemas`

Operation ID: `create-plugin-schemas`

Upload a custom plugin schema associated with a control plane.

## Path parameters

- `controlPlaneId` (string, uuid, required) - The UUID of your control plane. This variable is available in the Konnect manager.

## Request body

Content types: `application/json`

## Responses

- `201` - A response for a single custom plugin schema.
- `400` - Forbidden
- `401` - Unauthorized
- `403` - Forbidden
- `409` - Forbidden

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Konnect Control Planes Configuration
  version: 3.14.0
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
paths:
  /control-planes/{controlPlaneId}/core-entities/plugin-schemas:
    parameters:
      - $ref: "#/components/parameters/controlPlaneId"
    post:
      operationId: create-plugin-schemas
      summary: Upload custom plugin schema
      description: Upload a custom plugin schema associated with a control plane.
      requestBody:
        $ref: "#/components/requestBodies/create-plugin-schemas"
      responses:
        "201":
          $ref: "#/components/responses/plugin-schemas"
        "400":
          $ref: "#/components/responses/KonnectCPLegacyBadRequest"
        "401":
          $ref: "#/components/responses/KonnectCPLegacyUnauthorized"
        "403":
          $ref: "#/components/responses/KonnectCPLegacyForbidden"
        "409":
          $ref: "#/components/responses/KonnectCPLegacyConflict"
      tags:
        - Custom Plugin Schemas
security:
  - konnectAccessToken: []
  - personalAccessToken: []
components:
  parameters:
    controlPlaneId:
      name: controlPlaneId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        example: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      description: The UUID of your control plane. This variable is available in the
        Konnect manager.
  requestBodies:
    create-plugin-schemas:
      content:
        application/json:
          schema:
            type: object
            properties:
              lua_schema:
                description: |
                  The custom plugin schema; `jq -Rs '.' schema.lua`.
                type: string
                example: return { name = "myplugin", fields = { { config = { type = "record",
                  fields = { } } } } }
            required:
              - lua_schema
            x-examples:
              Example 1:
                lua_schema: return { name = \"myplugin\", fields = { { config = { type =
                  \"record\", fields = { } } } } }
  responses:
    plugin-schemas:
      description: A response for a single custom plugin schema.
      content:
        application/json:
          schema:
            type: object
            properties:
              item:
                type: object
                properties:
                  lua_schema:
                    description: The custom plugin schema; `jq -Rs '.' schema.lua`.
                    type: string
                    example: return { name = \"myplugin\", fields = { { config = { type =
                      \"record\", fields = { } } } } }
                  name:
                    description: The custom plugin name determined by the custom plugin schema.
                    type: string
                    example: myplugin
                  created_at:
                    description: An ISO-8604 timestamp representation of custom plugin schema
                      creation date.
                    type: integer
                    example: 1422386534
                  updated_at:
                    description: An ISO-8604 timestamp representation of custom plugin schema update
                      date.
                    type: integer
                    example: 1422412345
    KonnectCPLegacyBadRequest:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/KonnectCPLegacyBadRequestError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/KonnectCPLegacyBadRequestExample"
    KonnectCPLegacyUnauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/KonnectCPLegacyUnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/KonnectCPLegacyUnauthorizedExample"
    KonnectCPLegacyForbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/KonnectCPLegacyForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/KonnectCPLegacyForbiddenExample"
    KonnectCPLegacyConflict:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/KonnectCPLegacyConflictError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/KonnectCPLegacyConflictExample"
  schemas:
    KonnectCPLegacyBadRequestError:
      allOf:
        - $ref: "#/components/schemas/KonnectCPLegacyBaseError"
        - type: object
          properties:
            message:
              example: Bad Request
    KonnectCPLegacyUnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/KonnectCPLegacyBaseError"
        - type: object
          properties:
            message:
              example: Unauthorized
    KonnectCPLegacyForbiddenError:
      allOf:
        - $ref: "#/components/schemas/KonnectCPLegacyBaseError"
        - type: object
          properties:
            message:
              example: Forbidden
    KonnectCPLegacyConflictError:
      allOf:
        - $ref: "#/components/schemas/KonnectCPLegacyBaseError"
        - type: object
          properties:
            message:
              example: Conflict
    KonnectCPLegacyBaseError:
      description: standard error
      type: object
      properties:
        message:
          description: |
            A short summary of the problem.
          type: string
          readOnly: true
      title: Error
  examples:
    KonnectCPLegacyBadRequestExample:
      value:
        message: Bad Request
    KonnectCPLegacyUnauthorizedExample:
      value:
        message: Unauthorized
    KonnectCPLegacyForbiddenExample:
      value:
        message: Forbidden
    KonnectCPLegacyConflictExample:
      value:
        message: Conflict
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      description: The Konnect access token is meant to be used by the Konnect
        dashboard and the decK CLI to authenticate with.
    personalAccessToken:
      type: http
      scheme: bearer
      description: The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs. You can generate a Personal
        Access Token (PAT) from the personal access token page in the Konnect
        dashboard.
```
