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

# Delete function

> Permanently delete a function



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/functions.yaml delete /api/functions/{slug}
openapi: 3.0.3
info:
  title: Insforge Functions API
  version: 1.0.0
  description: Serverless functions running in Deno runtime
servers: []
security: []
paths:
  /api/functions/{slug}:
    delete:
      tags:
        - Admin
      summary: Delete function
      description: Permanently delete a function
      parameters:
        - name: slug
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-zA-Z0-9_-]+$
          description: Function slug identifier
          example: hello-world
      responses:
        '200':
          description: Function deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
              example:
                success: true
                message: Function hello-world deleted successfully
        '404':
          description: Function not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Function not found
        '500':
          description: Failed to delete function
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
        details:
          oneOf:
            - type: string
            - type: array
              items:
                type: object
            - type: object
          description: Additional error details
        message:
          type: string
          description: Detailed error message
        pattern:
          type: string
          description: >-
            Pattern that caused validation failure (for dangerous code
            detection)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````