Kong · Capability

Kong Enterprise Admin API — API-keys

Kong Enterprise Admin API — API-keys. 3 operations. Lead operation: Create a new API-key associated with a Consumer. Self-contained Naftiko capability covering one Kong business surface.

Run with Naftiko KongAPI-keys

What You Can Do

POST
Createkeyauthwithconsumer — Create a new API-key associated with a Consumer
/v1/{workspace}/consumers/{consumeridfornestedentities}/key-auth
DELETE
Deletekeyauthwithconsumer — Delete a an API-key associated with a Consumer
/v1/{workspace}/consumers/{consumeridfornestedentities}/key-auth/{keyauthid}
GET
Getkeyauthwithconsumer — Get an API-key associated with a Consumer
/v1/{workspace}/consumers/{consumeridfornestedentities}/key-auth/{keyauthid}

MCP Tools

create-new-api-key-associated

Create a new API-key associated with a Consumer

delete-api-key-associated-consumer

Delete a an API-key associated with a Consumer

idempotent
get-api-key-associated-consumer

Get an API-key associated with a Consumer

read-only idempotent

Capability Spec

gateway-admin-api-keys.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Kong Enterprise Admin API — API-keys
  description: 'Kong Enterprise Admin API — API-keys. 3 operations. Lead operation: Create a new API-key associated with a
    Consumer. Self-contained Naftiko capability covering one Kong business surface.'
  tags:
  - Kong
  - API-keys
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    KONG_API_KEY: KONG_API_KEY
capability:
  consumes:
  - type: http
    namespace: gateway-admin-api-keys
    baseUri: ''
    description: Kong Enterprise Admin API — API-keys business capability. Self-contained, no shared references.
    resources:
    - name: workspace-consumers-ConsumerIdForNestedEntities-key-auth
      path: /{workspace}/consumers/{ConsumerIdForNestedEntities}/key-auth
      operations:
      - name: createkeyauthwithconsumer
        method: POST
        description: Create a new API-key associated with a Consumer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: workspace-consumers-ConsumerIdForNestedEntities-key-auth-KeyAuthId
      path: /{workspace}/consumers/{ConsumerIdForNestedEntities}/key-auth/{KeyAuthId}
      operations:
      - name: deletekeyauthwithconsumer
        method: DELETE
        description: Delete a an API-key associated with a Consumer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: getkeyauthwithconsumer
        method: GET
        description: Get an API-key associated with a Consumer
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: apikey
      key: Kong-Admin-Token
      value: '{{env.KONG_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: gateway-admin-api-keys-rest
    port: 8080
    description: REST adapter for Kong Enterprise Admin API — API-keys. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/{workspace}/consumers/{consumeridfornestedentities}/key-auth
      name: workspace-consumers-consumeridfornestedentities-key-auth
      description: REST surface for workspace-consumers-ConsumerIdForNestedEntities-key-auth.
      operations:
      - method: POST
        name: createkeyauthwithconsumer
        description: Create a new API-key associated with a Consumer
        call: gateway-admin-api-keys.createkeyauthwithconsumer
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/{workspace}/consumers/{consumeridfornestedentities}/key-auth/{keyauthid}
      name: workspace-consumers-consumeridfornestedentities-key-auth-keyauthid
      description: REST surface for workspace-consumers-ConsumerIdForNestedEntities-key-auth-KeyAuthId.
      operations:
      - method: DELETE
        name: deletekeyauthwithconsumer
        description: Delete a an API-key associated with a Consumer
        call: gateway-admin-api-keys.deletekeyauthwithconsumer
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: getkeyauthwithconsumer
        description: Get an API-key associated with a Consumer
        call: gateway-admin-api-keys.getkeyauthwithconsumer
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: gateway-admin-api-keys-mcp
    port: 9090
    transport: http
    description: MCP adapter for Kong Enterprise Admin API — API-keys. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: create-new-api-key-associated
      description: Create a new API-key associated with a Consumer
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: gateway-admin-api-keys.createkeyauthwithconsumer
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-api-key-associated-consumer
      description: Delete a an API-key associated with a Consumer
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: gateway-admin-api-keys.deletekeyauthwithconsumer
      outputParameters:
      - type: object
        mapping: $.
    - name: get-api-key-associated-consumer
      description: Get an API-key associated with a Consumer
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: gateway-admin-api-keys.getkeyauthwithconsumer
      outputParameters:
      - type: object
        mapping: $.