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

# Delete Prompt Version

> Deletes a specific prompt version

## Delete a Prompt Version

This endpoint deletes a specific prompt version by its ID.

### URL Parameters

| Parameter | Type   | Description                            |
| --------- | ------ | -------------------------------------- |
| `id`      | string | The ID of the prompt version to delete |

### Examples

<CodeGroup>
  ```typescript typescript theme={null}
  const promptVersionId = 'version_uuid'

  const response = await fetch(`https://api.tela.ai/prompt-version/${promptVersionId}`, {
    method: 'DELETE',
    headers: {
      'Authorization': `Bearer ${process.env.TELA_API_KEY}`,
      'Content-Type': 'application/json'
    }
  })

  const result = await response.json()
  console.log(result)
  ```

  ```javascript javascript theme={null}
  const promptVersionId = 'version_uuid'

  const response = await fetch(`https://api.tela.ai/prompt-version/${promptVersionId}`, {
    method: 'DELETE',
    headers: {
      'Authorization': `Bearer ${process.env.TELA_API_KEY}`,
      'Content-Type': 'application/json'
    }
  })

  const result = await response.json()
  console.log(result)
  ```

  ```python python theme={null}
  import requests
  import os

  api_key = os.getenv("TELA_API_KEY")
  prompt_version_id = "version_uuid"

  url = f"https://api.tela.ai/prompt-version/{prompt_version_id}"

  headers = {
      "Authorization": f"Bearer {api_key}",
      "Content-Type": "application/json"
  }

  response = requests.delete(url, headers=headers)
  result = response.json()
  print(result)
  ```
</CodeGroup>

### Response

The response includes a confirmation of the deletion.

```json theme={null}
{
  "id": "version_uuid",
  "deleted": true
}
```

### Notes

* Deleting a promoted prompt version will remove it from being available for use in completions.
* If a prompt has only one version, you may not be able to delete it without first deleting the entire prompt.
* Deleted prompt versions cannot be recovered. Make sure you want to permanently remove the version before calling this endpoint.


## OpenAPI

````yaml DELETE /prompt-version/{id}
openapi: 3.0.1
info:
  title: Tela API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tela.com
security: []
paths:
  /prompt-version/{id}:
    delete:
      description: Delete a prompt version
      operationId: deletePromptVersion
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Prompt version deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  deleted:
                    type: boolean

````