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

# Revoke an API key



## OpenAPI

````yaml /openapi.json delete /v1/keys/{id}
openapi: 3.1.0
info:
  title: datachad API
  description: Accounts, API keys and catalogue access for datachad datasets.
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.datachad.xyz
security: []
tags:
  - name: Auth
    description: Sign up, log in and read the current user.
  - name: API keys
    description: Create and revoke keys for programmatic access.
  - name: Datasets
    description: Browse the catalogue and its metadata.
paths:
  /v1/keys/{id}:
    delete:
      tags:
        - API keys
      summary: Revoke an API key
      operationId: revoke_key
      parameters:
        - name: id
          in: path
          description: Key ID from the list endpoint
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '204':
          description: Key revoked
        '401':
          description: Not signed in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: No such key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - bearerAuth: []
components:
  schemas:
    ErrorBody:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````