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

# Delete an API key

> Revokes an API key and removes its backing machine-to-machine application.



## OpenAPI

````yaml /api/en/api-keys.yaml delete /api/keys/{id}
openapi: 3.0.3
info:
  title: Altostrat SDX API Keys API
  version: 1.0.0
  description: >-
    Create, list, inspect, rotate, and revoke SDX API keys through the public
    `/api/keys` gateway path. API key secrets are returned only when you create
    or rotate a key.
servers:
  - url: https://v1.api.altostrat.io
    description: Production API Server
security:
  - BearerAuth: []
tags:
  - name: API Keys
    description: Manage server-to-server credentials for integrations that call SDX APIs.
paths:
  /api/keys/{id}:
    delete:
      tags:
        - API Keys
      summary: Delete an API key
      description: >-
        Revokes an API key and removes its backing machine-to-machine
        application.
      operationId: deleteApiKey
      parameters:
        - $ref: '#/components/parameters/ApiKeyId'
      responses:
        '204':
          description: The API key was deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    ApiKeyId:
      name: id
      in: path
      required: true
      description: The API key identifier.
      schema:
        type: string
        pattern: ^api_key_[0-9A-Za-z]{27}$
        example: api_key_2m3h5n7k9j8g7f6e5d4c3b2a
  responses:
    Unauthorized:
      description: Authentication is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The API key was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          example: The given data was invalid.
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Authenticate with an SDX user access token that has permission to manage
        API keys.

````