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

# Revoke API key

> Revoke an API key. The key will stop working immediately.



## OpenAPI

````yaml /openapi.json post /keys/{id}/revoke
openapi: 3.1.0
info:
  title: OpenWhispr API
  version: 1.0.0
  description: Manage notes, folders, transcriptions, and usage programmatically.
servers:
  - url: https://api.openwhispr.com/api/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /keys/{id}/revoke:
    post:
      tags:
        - Keys
      summary: Revoke API key
      description: Revoke an API key. The key will stop working immediately.
      operationId: revokeApiKey
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: API key ID.
      responses:
        '200':
          description: Key revoked.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '401':
          description: Invalid or expired token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Key not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
        - sessionToken: []
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key starting with owk_live_
    sessionToken:
      type: http
      scheme: bearer
      description: Short-lived session token starting with owt_

````