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

# Revoke API Key

> Revokes an API key for the authenticated user



## OpenAPI

````yaml POST /api-keys/{keyId}/revoke
openapi: 3.0.0
info:
  title: DeFindex API
  description: API documentation for DeFindex endpoints
  version: 1.0.0
  contact: {}
  x-logo:
    url: https://links.paltalabs.io/defindex-full.svg
    backgroundColor: '#0e0e0e'
    altText: DeFindex Logo
    href: https://defindex.io
servers: []
security: []
tags: []
paths:
  /api-keys/{keyId}/revoke:
    post:
      tags:
        - API Keys
      summary: Revoke API Key
      description: Revokes an API key for the authenticated user
      operationId: ApiKeysController_revokeApiKey
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiKeyRevokeDto'
      responses:
        '200':
          description: API key revoked successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates if the revocation was successful
      security:
        - bearer: []
components:
  schemas:
    ApiKeyRevokeDto:
      type: object
      properties:
        keyId:
          type: number
          example: 1
          description: The unique identifier of the API key to revoke
          minimum: 1
      required:
        - keyId
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.