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

# Spec Delete

> Delete a spec by its API name.

Deletes the spec identified by its API name. Requires authentication.

Parameters:
- api_name (str): The name of the spec to delete.

Returns:
- dict: A confirmation message if the spec is deleted successfully.

Raises:
- HTTPException(404): If the spec with the provided API name is not found.
- HTTPException(500): If an error occurs while deleting the spec.



## OpenAPI

````yaml delete /api/spec/{api_name}
openapi: 3.1.0
info:
  title: Apigene
  description: Apigene API
  version: 1.0.0
  contact:
    name: Apigene Support
    url: https://app.apigene.ai
    email: support@apigene.ai
servers:
  - url: https://app.apigene.ai
security:
  - BearerAuth: []
paths:
  /api/spec/{api_name}:
    delete:
      tags:
        - Spec
      summary: Spec Delete
      description: >-
        Delete a spec by its API name.


        Deletes the spec identified by its API name. Requires authentication.


        Parameters:

        - api_name (str): The name of the spec to delete.


        Returns:

        - dict: A confirmation message if the spec is deleted successfully.


        Raises:

        - HTTPException(404): If the spec with the provided API name is not
        found.

        - HTTPException(500): If an error occurs while deleting the spec.
      operationId: spec_delete
      parameters:
        - name: api_name
          in: path
          required: true
          schema:
            type: string
            title: Api Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        'Authorization: Bearer {token}'

````