> ## 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 sample

> Removes a single sample from a draft PVC voice. Only allowed while the voice is `PVC_VOICE_STATE_DRAFT` (or `PVC_VOICE_STATE_FAILED`).

Returns `409` for a queued, training, or ready voice.

## API reference

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

### 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 that owns the sample.
- `sampleId` (string; required) — Sample ID to delete.

### Response examples

#### 200: deleted

```json
{}
```

#### 409: default_response

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

#### 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>/samples/<sample-id>' \
--header "Authorization: Basic $INWORLD_API_KEY"
```

#### Python

```python
import requests

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

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

#### JavaScript

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

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

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