> ## Documentation Index
> Fetch the complete documentation index at: https://www.edenai.co/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke an API key

> Revokes an API key. This is permanent: the key stops authenticating immediately and cannot be re-enabled, but it stays listed with `revoked: true` for your records. Revoking an already revoked key is a no-op. Returns the revoked key. Requires the `manage:write` scope.



## OpenAPI

````yaml https://api.edenai.run/v2/info/splitted-schema/management_api/openapi.json delete /v3/manage/keys/{key_id}/
openapi: 3.0.3
info:
  title: Organization Management
  version: '2.0'
  description: Your project description
servers:
  - url: https://api.edenai.run
security: []
paths:
  /v3/manage/keys/{key_id}/:
    delete:
      tags:
        - API Keys
      summary: Revoke an API key
      description: >-
        Revokes an API key. This is permanent: the key stops authenticating
        immediately and cannot be re-enabled, but it stays listed with `revoked:
        true` for your records. Revoking an already revoked key is a no-op.
        Returns the revoked key. Requires the `manage:write` scope.
      operationId: manage_keys_destroy
      parameters:
        - in: path
          name: key_id
          schema:
            type: string
            format: uuid
          required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagementKey'
          description: ''
      security:
        - ManagementKeyAuth: []
components:
  schemas:
    ManagementKey:
      type: object
      description: >-
        An API key belonging to the organization. The secret is never included:
        `masked` shows the

        key prefix and last characters for identification, and `id` is the
        stable identifier used in

        `/manage/keys/{key_id}` URLs.


        `balance` is the remaining spendable amount, including usage not yet
        settled, or null when the

        key has no spending cap. Revoked keys stay listed with `revoked: true`
        and a `revoked_at`

        timestamp. `id` is null for a legacy key that has not been regenerated
        yet; such a key is

        listed but cannot be addressed by URL until it is regenerated.
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
          nullable: true
        name:
          type: string
          description: The token name
          maxLength: 200
        token_type:
          $ref: '#/components/schemas/TokenTypeD53Enum'
        member:
          type: string
          format: email
          readOnly: true
        masked:
          type: string
          readOnly: true
        active_balance:
          type: boolean
          description: Weither to use the balance field or not.
        balance:
          type: number
          format: double
          maximum: 100000
          minimum: -100000
          exclusiveMaximum: true
          exclusiveMinimum: true
          nullable: true
          readOnly: true
        expire_time:
          type: string
          format: date-time
          nullable: true
        revoked:
          type: boolean
          readOnly: true
        revoked_at:
          type: string
          format: date-time
          nullable: true
      required:
        - balance
        - id
        - masked
        - member
        - name
        - revoked
    TokenTypeD53Enum:
      enum:
        - sandbox_api_token
        - api_token
      type: string
      description: |-
        * `sandbox_api_token` - Sandbox
        * `api_token` - Back
  securitySchemes:
    ManagementKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: >-
        A management key (created from the organization dashboard or with `POST
        /v3/manage/auth-keys`), sent as `Authorization: Bearer
        <management_key>`. Inference API keys (`sk-eden...`) are not accepted on
        these endpoints.

````