> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-detect-table-modification.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete UDF version

> **Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Deletes a UDF version. The UDF must not be attached to any services.

<span data-endpoint-badge="Beta"><Badge color="blue">Beta</Badge></span>

**Disclaimer:** This beta endpoint is evolving; the API contract may change. <br /><br /> Deletes a UDF version. The UDF must not be attached to any services.


## OpenAPI

````yaml _specs/cloud-openapi.json DELETE /v1/organizations/{organizationId}/udfs/{functionName}/versions/{version}
openapi: 3.1.2
info:
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
  contact:
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-1037333
    email: support@clickhouse.com
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Role Management
  - name: Service
  - name: Backup
  - name: OpenAPI
  - name: Prometheus
  - name: ClickPipes
  - name: ClickStack
  - name: Postgres
  - name: UDF
paths:
  /v1/organizations/{organizationId}/udfs/{functionName}/versions/{version}:
    delete:
      tags:
        - UDF
      summary: Delete UDF version
      description: >-
        **Disclaimer:** This beta endpoint is evolving; the API contract may
        change. <br /><br /> Deletes a UDF version. The UDF must not be attached
        to any services.
      operationId: udfVersionDelete
      parameters:
        - in: path
          name: organizationId
          schema:
            description: ID of the requested organization.
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
          required: true
          description: ID of the requested organization.
        - in: path
          name: functionName
          schema:
            description: Name of the UDF.
            type: string
            pattern: ^[A-Za-z][A-Za-z0-9_]*$
          required: true
          description: Name of the UDF.
        - in: path
          name: version
          schema:
            description: Version number of the UDF.
            example: 1
            type: integer
            exclusiveMinimum: 0
          required: true
          description: Version number of the UDF.
      responses:
        '200':
          description: UDF version deleted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    description: HTTP status code.
                    example: 200
                    type: integer
                  requestId:
                    description: Unique id assigned to every request. UUIDv4
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
                required:
                  - status
                  - requestId
                additionalProperties: false
        '400':
          description: >-
            The request cannot be processed due to a client error. Please verify
            your request parameters and try again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    description: Error message.
                    type: string
                  issues:
                    description: Validation issues that caused the request to be rejected.
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          description: Path to the invalid field.
                          type: array
                          items:
                            anyOf:
                              - type: string
                              - type: number
                        code:
                          description: Validation issue code.
                          type: string
                        message:
                          description: Human-readable description of the issue.
                          type: string
                      required:
                        - path
                        - code
                        - message
                      additionalProperties: false
                  status:
                    description: HTTP status code.
                    example: 400
                    type: integer
                  requestId:
                    description: Unique id assigned to every request. UUIDv4
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
                required:
                  - error
                  - status
                  - requestId
                additionalProperties: false
        '404':
          description: UDF or version not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    description: Human-readable error message.
                    type: string
                  status:
                    description: HTTP status code.
                    example: 404
                    type: integer
                  requestId:
                    description: Unique id assigned to every request. UUIDv4
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
                required:
                  - error
                  - status
                  - requestId
                additionalProperties: false
        '409':
          description: >-
            The UDF version is the latest version, is attached to a service, or
            is still building.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    description: Human-readable error message.
                    type: string
                  status:
                    description: HTTP status code.
                    example: 409
                    type: integer
                  requestId:
                    description: Unique id assigned to every request. UUIDv4
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
                required:
                  - error
                  - status
                  - requestId
                additionalProperties: false
        '500':
          description: >-
            An internal server error has occurred. If this issue persists,
            please contact ClickHouse Cloud support for assistance.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    description: Error message.
                    type: string
                  status:
                    type: integer
                    description: HTTP status code.
                    example: 500
                  requestId:
                    description: Unique id assigned to every request. UUIDv4
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
                required:
                  - error
                  - status
                  - requestId
                additionalProperties: {}
components:
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Use key ID and key secret obtained in ClickHouse Cloud console:
        https://clickhouse.com/docs/cloud/manage/openapi

````