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

# Delete a PVC voice

> Deletes a PVC voice and all of its uploaded samples. Only allowed while the voice is `PVC_VOICE_STATE_DRAFT` or `PVC_VOICE_STATE_FAILED`. A `PVC_VOICE_STATE_READY` voice cannot be deleted through this API; its slot is released when the trained voice it produced is deleted via the Voices API.

<Warning>
Returns `409` for a ready voice. Release its slot by deleting the trained voice via the Portal voice library or `DELETE /voices/v1/workspaces/{workspace}/voices/{voice}`.
</Warning>

## API reference

**Endpoint:** `DELETE https://api.inworld.ai/voices/v1/pvcVoices/{voiceId}`

### Authorization

- `Authorization` (string; required) — Your [API key](../../../api-reference/introduction). Read permissions are required for GET endpoints. Write permissions are required for POST, PATCH, and DELETE endpoints.
  
   For Basic authentication, please populate `Basic $INWORLD_API_KEY`. You can create a key in one command with the [Inworld CLI](../../../developer-tools/inworld-cli): `inworld workspace add-key`.

### Path parameters

- `voiceId` (string; required) — Voice ID of the PVC voice to delete.

### Response examples

#### 200: deleted

```json
{}
```

#### 409: not_deletable

```json
{
  "code": 9,
  "message": "pvc voice 'my-professional-voice' cannot be deleted while in state PVC_VOICE_STATE_READY",
  "details": []
}
```

#### default: default_response

```json
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string"
    }
  ]
}
```

### Code examples

#### cURL

```bash
curl --location --request DELETE 'https://api.inworld.ai/voices/v1/pvcVoices/<voice-id>' \
--header "Authorization: Basic $INWORLD_API_KEY"
```

#### Python

```python
import requests

voice_id = "<voice-id>"
url = f"https://api.inworld.ai/voices/v1/pvcVoices/{voice_id}"
headers = {"Authorization": "Basic <api-key>"}

response = requests.delete(url, headers=headers)
print(response.json())
```

#### JavaScript

```javascript
const voiceId = '<voice-id>';
const url = `https://api.inworld.ai/voices/v1/pvcVoices/${voiceId}`;

const response = await fetch(url, {
  method: 'DELETE',
  headers: { 'Authorization': 'Basic <api-key>' },
});

const data = await response.json();
console.log(data);
```
