---
title: "Delete a consumer"
url: "https://nov18-dev.movespot.fyi/apis/konnect-centrally-managed-consumers-admin-api-0/versions/84f5e371-6d0e-45b1-b943-fe4dc428c317/operations/delete-consumer-in-realm"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-centrally-managed-consumers-admin-api-0/versions/84f5e371-6d0e-45b1-b943-fe4dc428c317.md

# Delete a consumer

`DELETE` `/realms/{realmId}/consumers/{consumerId}`

Operation ID: `delete-consumer-in-realm`

Delete a consumer. This operation removes the consumer from the system, causing all future authentication requests using keys associated with that consumer to fail. However, it does not immediately invalidate any cached keys stored in the gateway's state. These keys may remain usable until the cache expires, based on the TTL (Time-To-Live) configured for the realm.

## Path parameters

- `realmId` (string, uuid, required) - ID of the realm
- `consumerId` (string, required) - ID of the of the consumer

## Responses

- `204` - success
- `404` - not found

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Konnect Centrally Managed Consumers admin api
  version: 0.0.1
servers:
  - url: https://us.api.konghq.com/v1
    description: United-States Production region
  - url: https://eu.api.konghq.com/v1
    description: Europe Production region
  - url: https://au.api.konghq.com/v1
    description: Australia Production region
  - url: https://me.api.konghq.com/v1
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v1
    description: India Production region
  - url: https://sg.api.konghq.com/v1
    description: Singapore Production region
paths:
  /realms/{realmId}/consumers/{consumerId}:
    parameters:
      - $ref: "#/components/parameters/realmId"
      - $ref: "#/components/parameters/consumerId"
    delete:
      operationId: delete-consumer-in-realm
      summary: Delete a consumer
      description: >
        Delete a consumer. This operation removes the consumer from the system,
        causing all future authentication

        requests using keys associated with that consumer to fail. However, it
        does not immediately invalidate any

        cached keys stored in the gateway's state. These keys may remain usable
        until the cache expires, based on the

        TTL (Time-To-Live) configured for the realm.
      responses:
        "204":
          description: success
        "404":
          description: not found
      tags:
        - Centrally Managed Consumers
security:
  - systemAccountAccessToken: []
  - personalAccessToken: []
  - konnectAccessToken: []
components:
  parameters:
    realmId:
      name: realmId
      in: path
      required: true
      description: ID of the realm
      schema:
        type: string
        format: uuid
    consumerId:
      name: consumerId
      in: path
      required: true
      description: ID of the of the consumer
      schema:
        type: string
  securitySchemes:
    systemAccountAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The system account access token is meant for automations and
        integrations that are not directly associated with a human identity.

        You can generate a system account Access Token by creating a system
        account and then obtaining a system account access token for that
        account.

        The access token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer spat_i2Ej...'`
    personalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      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](https://cloud.konghq.com/global/account/tokens/) in the
        Konnect dashboard.

        The PAT token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer kpat_xgfT...'`
    konnectAccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        The Konnect access token is meant to be used by the Konnect dashboard
        and the decK CLI authenticate with.
```
